I solved the fatal error with downloading latest Twig, customizing some code, e.g.
FROM:
public function getGlobals()
TO:
public function getGlobals() : array
to avoid fatal errors like this: "Compile Error: Declaration of Gantry\Component\Twig\TwigExtension::getGlobals() must be compatible with Twig\Extension\GlobalsInterface::getGlobals(): array". I can work in administration but then I get fatal errors on frontend like this: "Unexpected token "name" of value "if" ("end of statement block" expected).", etc.
Even this can be relatively simple solved:
FROM:
{%- set offcanvas = null -%}
{%- for segment in segments if segment.type == 'offcanvas' %}
{%- set offcanvas = segment -%}
{% endfor -%}
TO:
{%- set offcanvas = null -%}
{%- for segment in segments %}
{% if segment.type == 'offcanvas' %}
{%- set offcanvas = segment -%}
{% endif %}
{% endfor -%}
So, with some simple changes, it works for me. Then unimportant warnings can be changed too:
Deprecated: Return type of Pimple\Container::offsetExists($id) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in libraries/gantry5/vendor/pimple/pimple/src/Pimple/Container.php on line 133
Deprecated: Return type of Pimple\Container::offsetGet($id) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in libraries/gantry5/vendor/pimple/pimple/src/Pimple/Container.php on line 98
Deprecated: Return type of Pimple\Container::offsetSet($id, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in libraries/gantry5/vendor/pimple/pimple/src/Pimple/Container.php on line 79
Deprecated: Return type of Pimple\Container::offsetUnset($id) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in libraries/gantry5/vendor/pimple/pimple/src/Pimple/Container.php on line 143
hi everyone, i'm having issues where my gantry5 cache gets corrupted, and the home page turns into a white screen, e.g:
Error: Creating directory failed for /home/user/public_html/cache/gantry5/g5_hydrogen/compiled/config/27db06d628b0cec24a0622f7d2df9676.php:
Creating directory failed for /home/user/public_html/cache/gantry5/g5_hydrogen/compiled/config/5fae0ac87da073a419170e2d76896fc0.php
I log in and clear the cache and it fixes it right away...
These are the standard classes
https://docs.gantry.org/gantry5/tutorials/utility-classes
You put them in the back end... not code... - extensions - templates - layout
Hello, im trying to stick the footer at the bottom, im using Helium theme in Joomla, so i added this code to custom.scss:
.bottom {
position: absolute;
width: 100%;
bottom: 0px;
}
then applied the class bottom to the footer section but then the footer goes over the content, if i comment bottom: 0px; i correctly see all the content but the footer isn't displayed properly all or just disappear in pages where there is much content.
@simone80an In fact, I do not think that the above will work now I have tested it on a live gantry site! I only tried it in some other html layout...
Not sure how gantry nests the body/page surround/section positions to be honest.
Personally, I would approach it using a UIKIT attribute but then I use a UIKIT 3 library on all of my Joomla Gantry sites.
@mahagr Hi Matias, is it possible to add a new breakpoint in the Gantry Layout > Styles > Breakpoint ?
Ideally I would like to add a further breakpoint for Mobile Landscape and rename the current Mobile designation to Mobile Portrait.
He adds:
the problem is that site is not showing joomla default components
like user component for login/logout etc.
@dmleeman thanks for your reply, i don't know if it's the best solution but seems i have solved using this js code
jQuery(function() {
scrollCalculation();
jQuery(window).resize(function() {
scrollCalculation();
});
});
function scrollCalculation(){
jQuery('#g-footer').removeClass('bottom');
if (!(jQuery(document).height() > jQuery(window).height()))
jQuery('#g-footer').addClass('bottom');
else
jQuery('#g-footer').removeClass('bottom');
}
and this CSS:
.bottom {
position: absolute;
width: 100%;
bottom: 0px;
}