CBsubs error with joomla 5

6 months 6 days ago - 6 months 5 days ago #335547 by activha
CBsubs error with joomla 5 was created by activha
Hello

After upgrade to joomla 5 I get exception errors on CBsubs like :

Exception Type: 
Error
File: /var/www/vhosts/cercle.business/html/libraries/src/Toolbar/Toolbar.php
Line: 148
Message: Call to undefined method Joomla\CMS\Document\RawDocument::getToolbar()

Also when trying to change a user field from the backend, the save fails without error, sending me back to the main CB backend home page. The changes for the user are not saved.

I have set debug and max error reporting but do not get any messages.

It simply fails to save the changed data

Any suggestion to debug this ?

EDIT : I found the issue for the save failure, that was another form included in a field. It was set to display on profile but not profile edit, but in the backend it displayed everywhere. So I used a condition [cb:if application_context="frontend"] and it works fine.

This leaves us only with the toolbar exception error

Please Log in to join the conversation.

6 months 5 days ago #335555 by krileon
Replied by krileon on topic CBsubs error with joomla 5
Please be sure CB and all plugins are completely up to date with latest build releases. If you still have issues please provide exact steps to reproduce it. We've went through and completely replaced and updated our Joomla APIs usage and tested everything Joomla 5 compatible so we need exact steps to hunt down cases we missed.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

6 months 5 days ago - 6 months 5 days ago #335585 by activha
Replied by activha on topic CBsubs error with joomla 5
All CB and plugins are up to date.


For the toolbar error, it happens in the backend when accessing baskets menu for instance.

I also got an error with Stripe payment.
When subscribing with Stripe subscribe I got an exception error at the end of the basket when arriving to the basket payment complete page.

I attached the log here :
A PHP Exception occurred on your site. Here you can find the stack trace:

Exception Type: TypeError
File: /var/www/vhosts/cercle.business/html/libraries/CBLib/CB/Database/Table/UserTable.php
Line: 679
Message: method_exists(): Argument #2 ($method) must be of type string, Joomla\CMS\User\User given

#0 /var/www/vhosts/cercle.business/html/libraries/CBLib/CB/Database/Table/UserTable.php(679): method_exists()
#1 /var/www/vhosts/cercle.business/html/components/com_comprofiler/plugin/user/plug_cbpaidsubscriptions/libraries/cbpaidUserExtension.php(453): CB\Database\Table\UserTable->store()
#2 /var/www/vhosts/cercle.business/html/components/com_comprofiler/plugin/user/plug_cbpaidsubscriptions/libraries/cbpaidUserExtension.php(310): cbpaidUserExtension->_adjustUserAclBlock()
#3 /var/www/vhosts/cercle.business/html/components/com_comprofiler/plugin/user/plug_cbpaidsubscriptions/products/usersubscription/cbpaidUsersubscriptionRecord.php(1038): cbpaidUserExtension->checkUserSubscriptions()
#4 /var/www/vhosts/cercle.business/html/components/com_comprofiler/plugin/user/plug_cbpaidsubscriptions/products/usersubscription/cbpaidUsersubscriptionRecord.php(855): cbpaidUsersubscriptionRecord->setBlockPaidUser()
#5 /var/www/vhosts/cercle.business/html/components/com_comprofiler/plugin/user/plug_cbpaidsubscriptions/controllers/cbpaidPayHandler.php(829): cbpaidUsersubscriptionRecord->activate()
#6 /var/www/vhosts/cercle.business/html/components/com_comprofiler/plugin/user/plug_cbpaidsubscriptions/processors/stripe/cbpaidsubscriptions.stripe.php(572): cbpaidPayHandler->updatePaymentStatus()
#7 /var/www/vhosts/cercle.business/html/components/com_comprofiler/plugin/user/plug_cbpaidsubscriptions/controllers/cbpaidControllerCBTab.php(743): cbpaidstripeoem->resultNotification()
#8 /var/www/vhosts/cercle.business/html/components/com_comprofiler/plugin/user/plug_cbpaidsubscriptions/cbpaidsubscriptions.php(1155): cbpaidControllerCBTab->getTabComponent()
#9 /var/www/vhosts/cercle.business/html/components/com_comprofiler/plugin/user/plug_cbpaidsubscriptions/controllers/cbpaidControllerCBComponent.php(92): getcbpaidsubscriptionsTab->getTabComponent()
#10 /var/www/vhosts/cercle.business/html/libraries/CBLib/CB/Legacy/cbPluginHandler.php(880): CBplug_cbpaidsubscriptions->getCBpluginComponent()
#11 /var/www/vhosts/cercle.business/html/libraries/CBLib/CB/Legacy/cbTabs.php(1611): cbPluginHandler->call()
#12 /var/www/vhosts/cercle.business/html/libraries/CBLib/CB/Legacy/cbTabs.php(1725): cbTabs->_callTabPlugin()
#13 /var/www/vhosts/cercle.business/html/components/com_comprofiler/comprofiler.php(731): cbTabs->tabClassPluginTabs()
#14 /var/www/vhosts/cercle.business/html/components/com_comprofiler/comprofiler.php(284): tabClass()
#15 /var/www/vhosts/cercle.business/html/libraries/src/Dispatcher/LegacyComponentDispatcher.php(71): require_once('...')
#16 /var/www/vhosts/cercle.business/html/libraries/src/Dispatcher/LegacyComponentDispatcher.php(73): Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher\{closure}()
#17 /var/www/vhosts/cercle.business/html/libraries/src/Component/ComponentHelper.php(361): Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch()
#18 /var/www/vhosts/cercle.business/html/libraries/src/Application/SiteApplication.php(218): Joomla\CMS\Component\ComponentHelper::renderComponent()
#19 /var/www/vhosts/cercle.business/html/libraries/src/Application/SiteApplication.php(261): Joomla\CMS\Application\SiteApplication->dispatch()
#20 /var/www/vhosts/cercle.business/html/libraries/src/Application/CMSApplication.php(306): Joomla\CMS\Application\SiteApplication->doExecute()
#21 /var/www/vhosts/cercle.business/html/includes/app.php(58): Joomla\CMS\Application\CMSApplication->execute()
#22 /var/www/vhosts/cercle.business/html/index.php(32): require_once('...')
#23 {main}
Request information

GET variables
//...

Please Log in to join the conversation.

6 months 4 days ago #335594 by krileon
Replied by krileon on topic CBsubs error with joomla 5

For the toolbar error, it happens in the backend when accessing baskets menu for instance.

Not able to confirm this issue. Will do another scan for toolbar Joomla API issues. CBSubs doesn't directly call Joomla toolbar API though only CB does so if there is an issue it should be everywhere. If you're able to provide a full callstack from server error log for the toolbar error that would be of big help in tracking the issue down. Maybe you have something else installed causing that? We're not calling getToolbar function anywhere in CB or CBSubs. Doesn't seam to exist as an API call in Joomla 5 either. The API we're using is the following and is the correct API.
Toolbar::getInstance()->appendButton( 'Custom', $html, $icon );

When subscribing with Stripe subscribe I got an exception error at the end of the basket when arriving to the basket payment complete page.

Was able to see a bug in the code on that line and am fixing for next CB build release.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

6 months 4 days ago #335602 by activha
Replied by activha on topic CBsubs error with joomla 5
here it is :
PS you should suppress the flood protection for dev users on the forum
That's really boring when replying to several posts ;-)
Exception Type: [code]Error
File: /var/www/vhosts/cercle.business/html/libraries/src/Toolbar/Toolbar.php
Line: 148
Message: Call to undefined method Joomla\CMS\Document\RawDocument::getToolbar() #0 /var/www/vhosts/cercle.business/html/libraries/CBLib/CB/Legacy/cbMenuBarBase.php(42): Joomla\CMS\Toolbar\Toolbar::getInstance()
#1 /var/www/vhosts/cercle.business/html/libraries/CBLib/CB/Legacy/CBtoolmenuBar.php(35): cbMenuBarBase::_output()
#2 /var/www/vhosts/cercle.business/html/libraries/CBLib/CB/Legacy/TOOLBAR_usersextras.php(227): CBtoolmenuBar::linkAction()
#3 /var/www/vhosts/cercle.business/html/administrator/components/com_comprofiler/comprofiler.toolbar.php(76): TOOLBAR_usersextras::_DEFAULT_PLUGIN_MENU()
#4 /var/www/vhosts/cercle.business/html/administrator/components/com_comprofiler/admin.comprofiler.controller.php(325): include('...')
#5 /var/www/vhosts/cercle.business/html/administrator/components/com_comprofiler/comprofiler.php(14): require('...')
#6 /var/www/vhosts/cercle.business/html/libraries/src/Dispatcher/LegacyComponentDispatcher.php(71): require_once('...')
#7 /var/www/vhosts/cercle.business/html/libraries/src/Dispatcher/LegacyComponentDispatcher.php(73): Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher\{closure}()
#8 /var/www/vhosts/cercle.business/html/libraries/src/Component/ComponentHelper.php(361): Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch()
#9 /var/www/vhosts/cercle.business/html/libraries/src/Application/AdministratorApplication.php(150): Joomla\CMS\Component\ComponentHelper::renderComponent()
#10 /var/www/vhosts/cercle.business/html/libraries/src/Application/AdministratorApplication.php(195): Joomla\CMS\Application\AdministratorApplication->dispatch()
#11 /var/www/vhosts/cercle.business/html/libraries/src/Application/CMSApplication.php(306): Joomla\CMS\Application\AdministratorApplication->doExecute()
#12 /var/www/vhosts/cercle.business/html/administrator/includes/app.php(58): Joomla\CMS\Application\CMSApplication->execute()
#13 /var/www/vhosts/cercle.business/html/administrator/index.php(32): require_once('...')
#14 {main}[/code]

Please Log in to join the conversation.

6 months 4 days ago #335608 by krileon
Replied by krileon on topic CBsubs error with joomla 5
The error is coming from Joomla and not CB. We're calling the Toolbar API correctly. So this looks like a bug in Joomla's backwards compatible Toolbar::getInstance function call. Doesn't really explain why it works perfectly fine in my tests though. Seams like the document instance in Joomla was changed to raw document by something.

Maybe something went wrong with your Joomla 5 upgrade? Try clearing Joomla cache and delete the following file to cause the autoloader cache to rebuild then retry.

/administrator/cache/autoload_psr4.php


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.594 seconds

Facebook Twitter LinkedIn