JCB 3.2.0 compile error : missing global privacy plugin #1070

Open
opened 2024-03-10 18:52:08 +00:00 by fdinkler · 5 comments
Member

Steps to reproduce the issue

Fresh install of Joomla 3.10.12
Fresh install of pkg-component-builder-v3.x.zip (3.2.0)
Edit Options to fulfill mandatory fields & save
Compile Demo (public)
Change compiler options "Global powers = No" - this will throw a second error if selected Yes
Compile Demo (public) for Joomla 3

Expected result

Successful compile

Actual result

Error
"You do not have a global privacy plugin setup, so the integration with Joomla privacy suite could not be build."

I installed the compiled Demo component anyway - both Site and Admin views are blank - system debug info is not rendered in either case

System information (as much as possible)

OS Name & Version: Ubuntu 22.04.4
MySql Version: 8.1.27
Apache Version: Apache 2.4.58
PHP Version: 8.1.27
Joomla Version: 3.10.12
JCB Version: 3.2.0
Browser: Firefox 123

Additional comments

Installed the compiled Dem component anyway -
threw error Class "Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power" not found when executing component

### Steps to reproduce the issue Fresh install of Joomla 3.10.12 Fresh install of pkg-component-builder-v3.x.zip (3.2.0) Edit Options to fulfill mandatory fields & save Compile Demo (public) Change compiler options "Global powers = No" - this will throw a second error if selected Yes Compile Demo (public) for Joomla 3 ### Expected result Successful compile ### Actual result Error "You do not have a global privacy plugin setup, so the integration with Joomla privacy suite could not be build." I installed the compiled Demo component anyway - both Site and Admin views are blank - system debug info is not rendered in either case ### System information (as much as possible) OS Name & Version: Ubuntu 22.04.4 MySql Version: 8.1.27 Apache Version: Apache 2.4.58 PHP Version: 8.1.27 Joomla Version: 3.10.12 JCB Version: 3.2.0 Browser: Firefox 123 ### Additional comments Installed the compiled Dem component anyway - threw error Class "Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power" not found when executing component
fdinkler changed title from JCB 3.2-beta5 compile error :missing global privacy plugin" to JCB 3.2.0 compile error : missing global privacy plugin 2024-03-27 21:12:37 +00:00
Author
Member

Reconfirmed that this error remains in the latest 3.2 JCB release.

Reconfirmed that this error remains in the latest 3.2 JCB release.
Owner

This "privacy plugin" is now in the newer packages. So if you do a fresh install it should be there. But only in fresh installs.

image

So just open the privacy plugin and select it:
image
image

But even without it you component will work, it should really be a notice, or warning... not error. I must still deescalate that notice.

What I really think, is that the missing Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power is your problem. This happens when JCB can't fetch the abstract class StringHelper power from this repository: https://git.vdm.dev/joomla/super-powers/src/branch/master/src/1f28cb53-60d9-4db1-b517-3c7dc6b429ef

So if you go into the powers area and click on [init] what happens?

  • It should load many powers into your system...

Once JCB has all the powers it needs your component should work. So normally during the compilation of your component JCB will automatically fetch only those powers it needs, and that will only be done the first time for each power, for there after it will pull it from your own database. There are many reasons this can fail...

  • Usually its simple that our system is overloaded. (So just retry or wait a few minutes and retry again)
  • Or that your system blocks the request. (Just allow the request)
  • It can also be that not all the JCB plugins needed are activated and linked to JCB.
  • Can also be that Joomla 3 is not on PHP 8.0 (Joomla file and folder classes fail in higher PHP versions)
  • Can also be because JCB is not completely installed due to PHP limitations. (To fix this increase the PHP limitations to:)
; Resource Limits and File Uploads
upload_max_filesize = 128M
post_max_size = 128M
max_execution_time = 60
max_input_vars = 5000
max_input_time = 60
memory_limit = 256M
  • There can be a real bug... that is hiding from me.

There might be more... when we build this (super powers) area we took serious care to do it right, and yet it seems more care is needed, but where? So if you can give us more info, or underline what solved the issue for you.

I just again and again and again... installed JCB 3.2.0 on a Joomla 3 (blank, like in fresh docker image each time) and I am not getting this issue.

image
image
image
image
image
image

This "privacy plugin" is now in the newer packages. So if you do a fresh install it should be there. But only in fresh installs. ![image](https://git.vdm.dev/attachments/5e4b2ed5-e4be-4dcc-bad2-7a048c493840) So just open the privacy plugin and select it: ![image](https://git.vdm.dev/attachments/70258367-990a-46a9-9510-de7ce26a1c45) ![image](https://git.vdm.dev/attachments/98ff65ad-51f0-4f2a-940b-17b9a2908bc8) But even without it you component will work, it should really be a notice, or warning... not error. I must still deescalate that notice. What I really think, is that the missing `Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power` is your problem. This happens when JCB can't fetch the `abstract class StringHelper` power from this repository: https://git.vdm.dev/joomla/super-powers/src/branch/master/src/1f28cb53-60d9-4db1-b517-3c7dc6b429ef So if you go into the powers area and click on [init] what happens? - It should load many powers into your system... Once JCB has all the powers it needs your component should work. So normally during the compilation of your component JCB will automatically fetch only those powers it needs, and that will only be done the first time for each power, for there after it will pull it from your own database. There are many reasons this can fail... - Usually its simple that our system is overloaded. (So just retry or wait a few minutes and retry again) - Or that your system blocks the request. (Just allow the request) - It can also be that **not** all the JCB plugins needed are activated and linked to JCB. - Can also be that Joomla 3 is not on PHP 8.0 (Joomla file and folder classes fail in higher PHP versions) - Can also be because JCB is not completely installed due to PHP limitations. (To fix this increase the PHP limitations to:) ``` ; Resource Limits and File Uploads upload_max_filesize = 128M post_max_size = 128M max_execution_time = 60 max_input_vars = 5000 max_input_time = 60 memory_limit = 256M ``` - There can be a real bug... that is hiding from me. There might be more... when we build this (super powers) area we took serious care to do it right, and yet it seems more care is needed, but where? So if you can give us more info, or underline what solved the issue for you. I just again and again and again... installed JCB 3.2.0 on a Joomla 3 (blank, like in fresh docker image each time) and I am not getting this issue. ![image](https://git.vdm.dev/attachments/e2a321cb-7b43-47ba-9b2e-e3e76ee95f17) ![image](https://git.vdm.dev/attachments/d43764fb-1c97-4d95-a7e9-0c61a7cc2636) ![image](https://git.vdm.dev/attachments/9740f1d5-fa27-4e83-bc95-21ef03397050) ![image](https://git.vdm.dev/attachments/9be80f73-7a36-4a8d-a2e8-4211fe427770) ![image](https://git.vdm.dev/attachments/159221a2-6305-4109-9c20-4727473358d1) ![image](https://git.vdm.dev/attachments/b0474d4d-7c83-44c9-b65a-0622968ffd9d)
Author
Member

Llewellyn - thanks for the details. The plugins were installed, as you suggested.
I configured the Plug-in.
The Init on Powers took a few minutes but completed successfully.

I then attempted another compile of Demo, target = J3
The compiler threw this error almost immediately...

VDM\Joomla\Utilities\String\PluginHelper::safeLangPrefix(): Argument #2 ($group) must be of type string, null given, called in /var/www/html/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Joomlaplugin/Data.php on line 322

I'm still missing a setting somewhere...
Fred

Llewellyn - thanks for the details. The plugins were installed, as you suggested. I configured the Plug-in. The Init on Powers took a few minutes but completed successfully. I then attempted another compile of Demo, target = J3 The compiler threw this error almost immediately... VDM\Joomla\Utilities\String\PluginHelper::safeLangPrefix(): Argument #2 ($group) must be of type string, null given, called in /var/www/html/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Joomlaplugin/Data.php on line 322 I'm still missing a setting somewhere... Fred
Owner

This is a new issue actually...

 /var/www/html/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Joomlaplugin/Data.php on line 322

Can be viewed here: Data.php#L322

As you can see the only way that error will occur is if the second argument $plugin->group is null, and not a string. So can you confirm that the plugin has a group selected?

This is a new issue actually... ``` /var/www/html/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Joomlaplugin/Data.php on line 322 ``` Can be viewed here: [Data.php#L322](https://git.vdm.dev/joomla/Component-Builder/src/commit/ddb07c79d95676cbf094d7c1f9db8fbceeb6e096/libraries/jcb_powers/VDM.Joomla/src/Componentbuilder/Compiler/Joomlaplugin/Data.php#L322) As you can see the only way that error will occur is if the second argument `$plugin->group` is null, and not a string. So can you confirm that the plugin has a group selected?
Owner

I quickly had a look on our testing system and found the issue...

Since the plugin data is added to the install package... we did not add the corresponding Boilerplate values and so... during the compiling of the packages those values could not be found.

SO I clicked the get Boilerplate and while it failed it retrieved enough data so that the plugin groups where not there.

So yes this is a oversight "bug" thanks for reporting it.

So while I explained that you can ignore the missing plugin warnings... it seems adding it caused this issue.

I quickly had a look on our testing system and found the issue... Since the plugin data is added to the install package... we did not add the corresponding `Boilerplate` values and so... during the compiling of the packages those values could not be found. SO I clicked the `get Boilerplate` and while it failed it retrieved enough data so that the plugin groups where not there. So yes this is a oversight "bug" thanks for reporting it. So while I explained that you can ignore the missing plugin warnings... it seems adding it caused this issue.
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 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#1070
No description provided.