[BUG]: #1193 was closed but still not working #1199
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What Happened?
#1193 was closed, but is still an problem:
It seems that the JCB's Super Power feature incorrectly is placing additional use statements in the file below defined('_JEXEC') or die; and
#[\AllowDynamicProperties] , resulting in a syntax error.
// No direct access to this file
\defined('_JEXEC') or die;
/**
*/
#[\AllowDynamicProperties]
use JCB\Joomla\Utilities\ArrayHelper;
use JCB\Joomla\Utilities\StringHelper;
class HtmlView extends BaseHtmlView
{
It seems to occure with the following powers:
use JCB\Joomla\Utilities\ArrayHelper;
use JCB\Joomla\Utilities\StringHelper;
Steps to reproduce the Bug
It occured after adding Add [AllowDynamicProperties] in the base view class for J5 in v5.0.1 alpha 1. With v5.03 all works fine.
Installing on my Synology NAS (Docker) made no difference.
Callstack:
Er heeft zich een fout voorgedaan.
0 syntax error, unexpected token "use"
Call Stack
Function Location
1 () JROOT\administrator\components\com_**\src\View\Familytrees\HtmlView.php:47
2 Composer\Autoload{closure}() JROOT\libraries\vendor\composer\ClassLoader.php:427
3 Composer\Autoload\ClassLoader->loadClass() JROOT\libraries\src\Autoload\ClassLoader.php:59
4 Joomla\CMS\Autoload\ClassLoader->loadClass()
5 class_exists() JROOT\libraries\src\MVC\Factory\MVCFactory.php:299
6 Joomla\CMS\MVC\Factory\MVCFactory->getClassName() JROOT\libraries\src\MVC\Factory\MVCFactory.php:214
7 Joomla\CMS\MVC\Factory\MVCFactory->createView() JROOT\libraries\src\MVC\Controller\BaseController.php:610
8 Joomla\CMS\MVC\Controller\BaseController->createView() JROOT\libraries\src\MVC\Controller\BaseController.php:879
9 Joomla\CMS\MVC\Controller\BaseController->getView() JROOT\libraries\src\MVC\Controller\BaseController.php:656
10 Joomla\CMS\MVC\Controller\BaseController->display() JROOT\administrator\components\com_foaralden\src\Controller\DisplayController.php:52
11 JCB\Component\Foaralden\Administrator\Controller\DisplayController->display() JROOT\libraries\src\MVC\Controller\BaseController.php:731
12 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT\libraries\src\Dispatcher\ComponentDispatcher.php:143
13 Joomla\CMS\Dispatcher\ComponentDispatcher->dispatch() JROOT\libraries\src\Component\ComponentHelper.php:361
14 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT\libraries\src\Application\AdministratorApplication.php:150
15 Joomla\CMS\Application\AdministratorApplication->dispatch() JROOT\libraries\src\Application\AdministratorApplication.php:195
16 Joomla\CMS\Application\AdministratorApplication->doExecute() JROOT\libraries\src\Application\CMSApplication.php:306
17 Joomla\CMS\Application\CMSApplication->execute() JROOT\administrator\includes\app.php:58
18 require_once() JROOT\administrator\index.php:32
Which Joomla version are you compiling in?
see above
Which PHP version are you compiling in?
8.1
Which Joomla versions are you targeting?
see above
Which PHP version are you targeting?
8.1
Which Web server is JCB running on?
Apache 2.4
Which Relational Database is JCB running on?
MariaDB
Which OS is JCB running on?
xampp/synology
Which JCB version are you using?
see above
Where in JCB did this issue occur?
Compilation of a component
On which browsers did you encounter the issue?
Firefox
Additional Comments
Is it related to #1121?
Thank you for raising this issue. After carefully reviewing your report, we’ve tested the same functionality within the environments we use for JCB development, and we have not been able to reproduce the behavior you described. This includes testing the generation of
HTMLView.php
files whereuse
statements are positioned correctly above the#[\AllowDynamicProperties]
tag.As a team, we develop and test JCB within a consistent environment using Docker deployed via Octojoom, primarily on Ubuntu systems. This is not because we believe this setup is inherently better than others, but simply because it allows us to maintain a reliable and unified environment for development and testing.
Given that we cannot reproduce the issue in our environment, we are unable to diagnose or resolve this problem without further insights. We kindly suggest trying to replicate your setup within a similar environment to ours—specifically using Octojoom with Docker on Ubuntu or Mac to see if the issue persists. If it does, we’d be happy to assist further.
Unfortunately, our current resources do not allow us to investigate or address platform-specific issues outside of this development environment. We hope for your understanding in this matter and deeply value your contributions to improving JCB.
Please let us know if you’d like assistance setting up a similar environment or if you encounter additional issues.