@Wicko-Design I completely agree and that's how I build all my sites. Only use one or two frontend extensions.
I would highly recommend Joomlead, they have a full range of over 100 Particles and they all use UIKIT3 but sites still reach 100% performance.
joomlead: https://joomlead.com/gantry-5-particles/
here is a demo store site I made with JL Particles on Joomla 4 on PHP 8.1.13: https://storedemo.whodesigns.co.uk/
(function () {
const createImage = (url) => {
const div = document.createElement("div");
div.classList = "img-thumbnail";
div.style.width = "250px";
const image = document.createElement("img");
image.src = url;
div.appendChild(image);
return div;
};
const serchInput = () => {
const inputs = document.querySelectorAll("input");
inputs.forEach((el) => {
if (
(el.getAttribute("name") &&
el.getAttribute("name").indexOf("glrimg") != -1) ||
(el.getAttribute("name") &&
el.getAttribute("name").indexOf("hover_image") != -1)
) {
if (el.value != "") {
el.parentNode.appendChild(
createImage("/images/" + el.value.substring(15))
);
} else {
el.parentNode.appendChild(
createImage("https://via.placeholder.com/250x250?text=hover image")
);
}
}
});
};
document.addEventListener("click", (event) => {
if (
event.target.classList == "config-cog" ||
event.target.parentNode.classList.value ==
"collection-editall button button-simple"
) {
//waiting to be displayed modal
setTimeout(() => {
serchInput();
}, 3000);
}
});
})();
name: Available Dogs
description: Displays a Title, Image, and Text on the front end.
type: particle
form:
fields:
enabled:
type: input.checkbox
label: Enable
description: Globally enable to the particles.
default: true
title:
type: input.text
label: Name
description: Customize the section title text.
image:
type: input.imagepicker
label: Image
description: Select the main image.
breed:
type: input.text
label: Primary Breed
description: Customize the section title text.
placeholder: Primary Breed
css.class:
type: input.text
label: Class
description: CSS class name for the particle.
Hi, is anyone having issues using Community Builder menu items in Gantry?
I'm getting a Whoops\Exception:
Error: During inheritance of Countable: Uncaught Whoops\Exception\ErrorException: Return type of Twig\Node\Node::count() should either be compatible with Counta ▶
Stack trace:
#0 /home/**/tst.****.org/libraries/gantry5/src/classes/Gantry/Component/Whoops/SystemFacade.php(112): Whoops\Run->handleError()
#1 /home/**/tst.****.org/libraries/gantry5/compat/vendor/twig/twig/src/Node/Node.php(23): Gantry\Component\Whoops\SystemFacade->handleError()
#2 /home/**/tst.****.org/libraries/vendor/composer/ClassLoader.php(571): include('/home/**/...')
#3 /home/**/tst.****.org/libraries/vendor/composer/ClassLoader.php(428): Composer\Autoload\includeFile()
#4 [internal function]: Composer\Autoload\ClassLoader->loadClass()
#5 /home/**/tst.****.org/libraries/gantry5/compat/vendor/twig/twig/src/TwigFilter.php(128): class_exists()
#6 /home/**/tst.****.org/libraries/vendor/composer/ClassLoader.php(571): include('/home/**/...')
#7 /home/**/tst.****.org/libraries/vendor/composer/ClassLoader.php(428): Composer\Autoload\includeFile()
#8 /home/**/tst.****.org/libraries/gantry5/src/classes/Gantry/Component/Theme/AbstractTheme.php(107): Composer\Autoload\ClassLoader->loadClass() ▶
#9 /home/**/tst.****.org/libraries/gantry5/src/classes/Gantry/Framework/Theme.php(70): Gantry\Component\Theme\AbstractTheme->extendTwig()
#10 /home/**/tst.****.org/libraries/gantry5/src/classes/Gantry/Component/Theme/AbstractTheme.php(158): Gantry\Framework\Theme->extendTwig()
#11 /home/**/tst.****.org/libraries/gantry5/src/classes/Gantry/Component/Theme/AbstractTheme.php(176): Gantry\Component\Theme\AbstractTheme->ren ▶
#12 /home/**/tst.****.org/templates/g5_hydrogen/index.php(35): Gantry\Component\Theme\AbstractTheme->render()
#13 /home/**/tst.****.org/libraries/src/Document/HtmlDocument.php(736): require('/home/**/...')
#14 /home/**/tst.****.org/libraries/src/Document/HtmlDocument.php(791): Joomla\CMS\Document\HtmlDocument->_loadTemplate()
#15 /home/**/tst.****.org/libraries/src/Document/HtmlDocument.php(608): Joomla\CMS\Document\HtmlDocument->_fetchTemplate()
#16 /home/**/tst.****.org/libraries/src/Application/CMSApplication.php(1004): Joomla\CMS\Document\HtmlDocument->parse()
#17 /home/**/tst.****.org/libraries/src/Application/SiteApplication.php(714): Joomla\CMS\Application\CMSApplication->render()
#18 /home/**/tst.****.org/libraries/src/Application/CMSApplication.php(299): Joomla\CMS\Application\SiteApplication->render()
#19 /home/**/tst.****.org/includes/app.php(61): Joomla\CMS\Application\CMSApplication->execute()
#20 /home/**/tst.****.org/index.php(32): require_once('/home/**/...')
#21 {main}
If anyone can help resolve my CB menus issue, it would be much appreciated.
Just to add some more detail:
@CoastalBird thanks for responding. Downgrading to 8.0 is significantly worse, so maybe I’ve got something going on with my design. When I asked CB forum about this it was suggest that I might have a stale version of twig.
The exception with 8.0 appears to be from twigextension.php - can’t find DOMdocument.
The exception from 8.1 appears to be from node.php
Not sure if that provides any clues
Peter
@pludikar That suggest to me that there may be a PHP extension running in your web hosting cPanel that could be causing a problem. I know that to run my Joomla4 Gantry 5.5.15 PHP8.1.12 based sites that the hosting needs to have the following disabled:
escapeshellcmd
escapeshellarg
but the mention of Systemfaceade and node.php suggest something else, more like a WP or Grav issue (systemfacade.php) and node.php as far as I can find is related to node.js scripts for WP
Is it a clean J4 install or a an update from J3?
@dmleeman Many thanks for your insight. It's been a while since I started working on my site with Joomla 4, and as far as I remember, I had issues trying to migrate from J3 so I ended up starting fresh with J4, but it was a beta version of J4 and I've migrated since then. As there wasn't anything suitable around for the zero budget I had, I ended up developing many features on my own. It's possible that something in the original beta version could have had latent problems, which only appeared in the released version.
I'm going to try to start with a fresh install of the latest J4.2, and slowly import the bits and pieces I need. I was hoping to avoid a lot of work, but it seems like there's a fundamental issue with my installation particularly as you've told me that you have J4 with Gantry and PHP 8.1 working (albeit with your host disabling escapeshellcmd/arg). That gives me a bit of hope. What a pain.