Error post Update to 3.1.26 #1014
Labels
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: joomla/Component-Builder#1014
Loading…
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?
Steps to reproduce the issue
Update to 3.1.26
Compile Component
Install Component
Expected result
Updated code installed on the site
Actual result
The error produced: Class "Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power" not found
I do not have any powers or superpowers added to the site.
System information (as much as possible)
Additional comments
I attempted to follow the clues and found the superpower that was referenced "Utilities String Helper". I approved the power and included it with my component since it was being referenced:
I now have this error: Class "VDM\Joomla\Utilities\StringHelper" not found
Few remarks:
Let me know if this does not resolve your issue.
Thank you for being so quick to reply. Lots of this goes way over my head, I am trying to follow along.
I followed your instructions (php8.0, firefox, internet access, all the plugins activated) and I’m still ending up with this error:
Class "VDM\Joomla\Utilities\StringHelper" not found
I clicked on the Init button on the Powers Tab and ended up with this error:
_Error
File at gitea.remote/src/c09e8968-c767-4175-bb3d-8432f206a2c7/settings.json gave the following error!
Invalid response received from API. The target couldn't be found._
Is this part of the problem?
I actually have seen that error before, but I am still not sure where it comes from, I wonder of you activate the debug mode in Joomla, does it give you more info?
I need to know in what class this wrong URL is set.
After your first compilation you should see the following:
Running init loads all JCB standard power classes, including those to use gitea, openai and search... and a few more, so that is pulling many classes into the powers area, and when complete should have about 175 +- powers, that look somethings like this:
The class is Utilities String Helper.
I deleted all the powers, re-compiled the component, and saw how the classes load into the powers. I compiled again and still have the error: 0
Class "VDM\Joomla\Utilities\StringHelper" not found
I also attempted to "activate" the Utilities String Helper and the classes that it referenced or called on and re-complied the component.
Debug mode gave me this when I loaded a SiteView (frontend) for my component:
Call stack
Function Location
1 () JROOT/components/com_learning/helpers/learning.php:785
2 LearningHelper::checkString() JROOT/components/com_learning/controller.php:111
3 LearningController->checkEditView() JROOT/components/com_learning/controller.php:38
4 LearningController->display() JROOT/libraries/src/MVC/Controller/BaseController.php:702
5 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/components/com_learning/learning.php:32
6 require_once() JROOT/libraries/src/Component/ComponentHelper.php:402
7 Joomla\CMS\Component\ComponentHelper::executeComponent() JROOT/libraries/src/Component/ComponentHelper.php:377
8 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/SiteApplication.php:194
9 Joomla\CMS\Application\SiteApplication->dispatch() JROOT/libraries/src/Application/SiteApplication.php:233
10 Joomla\CMS\Application\SiteApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:225
11 Joomla\CMS\Application\CMSApplication->execute() JROOT/index.php:49
Okay next you should look at two places in your component:
Both of these should have a
spl_autoload_register
method that set the auto-loading of the classes.This should be in place, then at the top of your helper class there should be a new set of
use
statements. That look something like this:https://git.vdm.dev/joomla/Component-Builder/src/branch/staging/admin/helpers/componentbuilder.php#L70
These use statement along side the
spl_autoload_register
loads the classes into your component at runtime. Can you confirm that this code is there?Then there should now be a new libraries/jcb_powers folder in you component package. This is where the new classes are found.
If this folder or the above mentioned code is not there, then it will explain the issue your having.
So let me know.
The two files admin/componentbuilder.php & /admin/helpers/componentbuilder.php both had the spl_autoload_register method and the use statements were present.
I see the libraries/jcb_powers for component builder but if it should be in the compilation of the component I make (mine is called com_learning) the libraries folder doesn't contain jcb_powers.
Hello @Llewellyn,
I also got the same issue, when I hit the init button in the powers area:
No other debug info shows up.
No error upon compiling
Yes I am speaking about your compiled component, I am just point to the JCB classes and folders as examples of what you should see in your package.
So if you don't see that folder, it means JCB is not adding it, and it is the cause of your issue.
I am not sure why though... I will have to get back to you.
I know the workaround is to manually link the strings class to you component. But this workaround is not the solution. I will have to investigate this a little more.
Please confirm that the plugin are activated in both areas:
Like this:
Since I have found that JCB does not add the classes when the
Extension - Componentbuilder Powers Autoloader Compiler
or theExtension - Componentbuilder Headers Compiler
plugin is inactive.I noted that my Active Complier Plugins had more extensions than what you had displayed:
Extension - Componentbuilder Export Complier
andExtension - Componentbuilder Language Package
andExtension - Joomla
I removed those and tried to compile my component. It came back with the same error.
Thank you for all your efforts.
Hmmm I assumed this would not be the case, but... you do have add power set to yes right?
There is two places this can be set:
Should you select global then it will use the component settings, else it will use what you choose.
The purpose of this, is to avoid adding powers to components when other components of the same website already has those powers.
This is the only component that I write and I have the powers set to Yes on the component settings and global when I compile.
do me a favor and add the following to your component helpers area:
SO that it looks like this:
Then compile and let me know if the issue continues.
I have updated the component package to version 3.1.27 and this issue should be resolved now, if not please bump this issue and we will reopen it. Enjoy!
I'm sorry for the delay, this is my side hustle, I've been working my real job. I have a new but related problem after upgrading to 3.1.27:
I have tried a few things. I compiled more than once. I tried removing the powers and letting them re-load from scratch. That intervention resulted in this same error.
I also tried to comment out the power of this power and compile, which resulted in each site view for my component on the front end loading a blank white page. I can see the powers loading in the component:
So let me ques your using some kind of encryption setting (basic|medium) on a field in your component. (just to confirm why these classes are loading.
To be fair this is really a new issue, that is related to the migration to fof/AES powers which is needed going to Joomla 4.
Which is honestly a massive pain to say the least, see the depreciation notice:
We also added a new message in the GUI:
So yes there is not easy migration path at this time.
What we are trying to do is extend the inevitable nightmare of decrypting each value en re-encryption of each value for all those who used these features.
So the port should load via the
spl_autoload_register
that is added to your components entry point, and helper class as explained above. This should look something like this:This is the critical part you should see:
Then in the file where these fields are stored and retrieved there should be a use statement like this:
use VDM\Joomla\FOF\Encrypt\AES;
Please confirm if this is the case, since this is done automatically via the new supper powers area.
If you are calling your module classes from outside your component, like a module or plugin, then you will have to add the following placeholder in the header of the class making the call:
###ADMIN_POWER_HELPER###
This will the add the autoloader to that class as well...
You can also add the autoloader to a plugin (in JCB) like this:
Make sure the plugin is set as a systems plugin, and loaded first.
I have tried to manage this as best I can, let me know what you can see. I have fixed a few more issues and will push out a new release soon. Issues related to the powers area, as this is a critical part of the path forward.
JCB is part of my real job 😉
Yes, I do have basic encryption set-up for a number of fields. I had not noticed the deprecation notices but now I know...
I can find all the code that you describe below however still end up with the error on a SiteView on the Frontend. The Backend admin views all work just fine. My component is mostly built to be a frontend component though.
I'm not calling from outside the component.
The site view are should also have the
spl_autoload_register
in the component entry point like the admin area does.Can you confirm this?
If this is true, then we need to start looking at custom code. We should also look at the module your using to load the data in this site view. The same
use
statements should be found in these areas as in the back-end where these encryption fields are being used.I can't see your component, and so unless you debug things on your side and show me what is missing, how will I know?
After digging deep and upgrading to 3.1.28 in both the site and admin side in the helper/learning.php (my component is com_learning)
the line:
'libraries/jcb_powers/VDM.Joomla.FOF' => 'VDM\Joomla\FOF',
is missing:
When I add it back, everything works well!
Okay, it seems like we have an event issue, I have now tried to fix this, but it will need more work in the future.
To test please try the beta version: https://git.vdm.dev/joomla-beta/pkg-component-builder/archive/master.zip
Beta works perfectly!