[BUG]: Invalid controller class: display #1098

Closed
opened 2024-03-27 15:46:24 +00:00 by AlexEdimensionz · 9 comments

What Happened?

Compiled on Joomla 3 for Joomla 5

None of the Admin views work, they all display "Invalid controller class: display"

I have the Compatibility Mode plugin enabled.

Steps to reproduce the Bug

After installing the extension, none of the Admin pages work.

Which Joomla version are you compiling in?

3

Which PHP version are you compiling in?

8.2

Which Joomla versions are you targeting?

v5.03

Which PHP version are you targeting?

8.2

Which Web server is JCB running on?

Apache 2.4

Which Relational Database is JCB running on?

MySQL 8.0

Which OS is JCB running on?

Ubuntu 23.10

Which JCB version are you using?

3.2.0 Stable

Which Joomla version is JCB installed on?

Joomla 3

Where in JCB did this issue occur?

Installation of JCB plugins

On which browsers did you encounter the issue?

Firefox, Chrome, Microsoft Edge

Additional Comments

No response

### What Happened? Compiled on Joomla 3 for Joomla 5 None of the Admin views work, they all display "Invalid controller class: display" I have the Compatibility Mode plugin enabled. ### Steps to reproduce the Bug After installing the extension, none of the Admin pages work. ### Which Joomla version are you compiling in? 3 ### Which PHP version are you compiling in? 8.2 ### Which Joomla versions are you targeting? v5.03 ### Which PHP version are you targeting? 8.2 ### Which Web server is JCB running on? Apache 2.4 ### Which Relational Database is JCB running on? MySQL 8.0 ### Which OS is JCB running on? Ubuntu 23.10 ### Which JCB version are you using? 3.2.0 Stable ### Which Joomla version is JCB installed on? Joomla 3 ### Where in JCB did this issue occur? Installation of JCB plugins ### On which browsers did you encounter the issue? Firefox, Chrome, Microsoft Edge ### Additional Comments _No response_
AlexEdimensionz added the
Bug
label 2024-03-27 15:46:24 +00:00
Member

Hi @AlexEdimensionz we will need much more details concerning this issue. This is because we have JCB and many other components already running on Joomla 4 and 5 and none of our components give this error.

Here are some considerations:

  • Do you have a custom folder path?
  • Can you run JCB in Joomla 3 on PHP 8.0 because this is the Joomla 3 limitation in relation to the files and folder classes of Joomla.
  • Can you give us the broken package (compiled package)?
  • If not can you give us the file that gives the error?
  • Did you update your PHP limits for both the Joomla 3 and 5 website?
  • Is this your own component or the demo component.
  • Are all the JCB plugins installed and activated and linked?

Please be sure to install JCB via the package link: https://git.vdm.dev/joomla/pkg-component-builder/archive/v3.2.0.zip

Any other information will also be helpful so we can try and reproduce the issue on our side.

Hi @AlexEdimensionz we will need much more details concerning this issue. This is because we have JCB and many other components already running on Joomla 4 and 5 and none of our components give this error. Here are some considerations: - Do you have a custom folder path? - Can you run JCB in Joomla 3 on PHP 8.0 because this is the Joomla 3 limitation in relation to the files and folder classes of Joomla. - Can you give us the broken package (compiled package)? - If not can you give us the file that gives the error? - Did you update your PHP limits for both the Joomla 3 and 5 website? - Is this your own component or the demo component. - Are all the JCB plugins installed and activated and linked? Please be sure to install JCB via the package link: https://git.vdm.dev/joomla/pkg-component-builder/archive/v3.2.0.zip Any other information will also be helpful so we can try and reproduce the issue on our side.
  • No custom folder path
  • Tried on PHP8.0 and same issue
  • I have attached the broken package
  • php.ini mods are done (for both. updated globally and installed on the same server)
  • This is my own component
  • All JCB plugins are active

(This plugin is active and did run on J3 previously)

I did install from that link, yes

- No custom folder path - Tried on PHP8.0 and same issue - I have attached the broken package - php.ini mods are done (for both. updated globally and installed on the same server) - This is my own component - All JCB plugins are active (This plugin is active and did run on J3 previously) I did install from that link, yes

Here is a version compiled on CentOS 7.9 with PHP8.0

I can also export the JCB project and upload it if you want

Here is a version compiled on CentOS 7.9 with PHP8.0 I can also export the JCB project and upload it if you want
Owner

Please remove the spaces in your component names.

So in JCB change the component code name from:
Travelous Oasis or travelous_oasis to TravelousOasis
Wyldcode Updater or wyldcode_updater to WyldcodeUpdater
image

This should fix your issue... and yes I know this means Joomla will see this as a new component and therefore its a pain. specially if you have this extension installed on Joomla 3 websites and want to upgrade the website with the existing data.

We have tried to catch this... but it is to hard... since its really a Joomla thing, or so it seems.

So this is the work-around for now... we might get a better solution going forward.

How to mitigate some of the pain is the add sql update statements to your pre-update area of the component that renames all your component tables to the new names, where the component has not spaces in its name.

Once you've don that, let me know it this issues remains unresolved.

I also noticed that you don't have any admin views set as main menu items. You should add those you want as sub menu... as main menu. The sub menu feature is not doing anything for now (going to Joomla 4 and 5), Joomla has taken over the sub menu, by merging main and sub menu into one. So if you want links to your admin views on the side of your component views, you need to check them as main menus for now.

I have deleted the links to you components, you could next time create a private repo and push the projects (packages) there instead... and just share the private link with us. That way it remains private.

Please remove the spaces in your component names. So in JCB change the component code name from: `Travelous Oasis` or `travelous_oasis` to `TravelousOasis` `Wyldcode Updater` or `wyldcode_updater` to `WyldcodeUpdater` ![image](https://git.vdm.dev/attachments/46efc80b-564e-41f9-98b4-c96002315fe4) This should fix your issue... and yes I know this means Joomla will see this as a new component and therefore its a pain. specially if you have this extension installed on Joomla 3 websites and want to upgrade the website with the existing data. We have tried to catch this... but it is to hard... since its really a Joomla thing, or so it seems. So this is the work-around for now... we might get a better solution going forward. How to mitigate some of the pain is the add sql update statements to your pre-update area of the component that renames all your component tables to the new names, where the component has not spaces in its name. Once you've don that, let me know it this issues remains unresolved. I also noticed that you don't have any admin views set as main menu items. You should add those you want as `sub menu`... as `main menu`. The sub menu feature is not doing anything for now (going to Joomla 4 and 5), Joomla has taken over the sub menu, by merging main and sub menu into one. So if you want links to your admin views on the side of your component views, you need to check them as main menus for now. I have deleted the links to you components, you could next time [create a private repo](https://git.vdm.dev/repo/create) and push the projects (packages) there instead... and just share the private link with us. That way it remains private.
5.9 KiB

Thank you!

That seemed to work. Weird because it was always that way before.
The issue now is that, even though I've disabled powers in the Component Settings and during compile, i get this error

Class "JCB\Component\Wyldcodeupdater\Administrator\Model\Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power" not found

Thank you! That seemed to work. Weird because it was always that way before. The issue now is that, even though I've disabled powers in the Component Settings and during compile, i get this error ` Class "JCB\Component\Wyldcodeupdater\Administrator\Model\Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power" not found`
Owner

You can no longer disable power... totally as JCB must fetch them as needed (so you also need the system to be able to call out)

Once it has the powers it needs it normally does not need to fetch them again.

The power its looking for is found here: https://git.vdm.dev/joomla/super-powers/src/branch/master/src/0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a

But I am sure it will need even more.... you can go to the powers area and click [init] this should also load them... so the compiler will not need to fetch them during the build.

You can no longer **disable power**... **totally** as JCB must fetch them as needed (so you also need the system to be able to call out) Once it has the powers it needs it normally does not need to fetch them again. The power its looking for is found here: https://git.vdm.dev/joomla/super-powers/src/branch/master/src/0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a But I am sure it will need even more.... you can go to the powers area and click [init] this should also load them... so the compiler will not need to fetch them during the build.
Owner

Weird because it was always that way before.

Well Joomla 3 did not use namespace, while Joomla 4 and 5 does and PHP conventions does not deal kindly with underscores in namespaces. It gets little technical.

> Weird because it was always that way before. Well Joomla 3 did not use namespace, while Joomla 4 and 5 does and PHP conventions does not deal kindly with underscores in namespaces. It gets little technical.
Owner

We have started moving thing out of the old Helper classes into a better stable maintainable class structures. This is why powers were created, and also why it has become a major part of JCB moving forward.

We have started moving thing out of the old Helper classes into a better stable maintainable class structures. This is why powers were created, and also why it has become a major part of JCB moving forward.

All working now! Thank you!
Will watch the "Super Powes" video to get a better idea of how to use them in my code

All working now! Thank you! Will watch the "Super Powes" video to get a better idea of how to use them in my code
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: joomla/Component-Builder#1098
No description provided.