rbuelund
  rbuelund
Contributor
  Friday, 06 November 2020
  20 Replies
  636 Visits
0
Votes
Undo
Just updated to JEvens 3.6.8 and RSVP Pro 3.6 stable - I get this error when I try to enter JSVP Pro:

"Cannot use object of type Joomla\CMS\Toolbar\Button\StandardButton as array "

This on a Joomla 4 site.
4 years ago
·
#219075
0
Votes
Undo
Hey Ronnie, can you enable your Joomla debug and set the debug level to development so we can determine where this is happening?
4 years ago
·
#219077
0
Votes
Undo
Here is the Call stack. Debug level = Maximum. There is no dev level in Joomla 4.

Call stack
# Function Location
1 () JROOT/libraries/src/Toolbar/Toolbar.php:345
2 Joomla\CMS\Toolbar\Toolbar->renderButton() JROOT/administrator/components/com_rsvppro/layouts/gslframework/header.php:145
3 include() JROOT/libraries/src/Layout/FileLayout.php:128
4 Joomla\CMS\Layout\FileLayout->render() JROOT/libraries/src/Layout/LayoutHelper.php:73
5 Joomla\CMS\Layout\LayoutHelper::render() JROOT/administrator/components/com_rsvppro/views/abstract/abstract.php:59
6 RSVPAbstractView->display() JROOT/administrator/components/com_rsvppro/controllers/params.php:78
7 AdminParamsController->edit() JROOT/libraries/src/MVC/Controller/BaseController.php:729
8 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/administrator/components/com_rsvppro/rsvppro.php:148
9 require_once() JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:69
10 Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher\{closure}() JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:71
11 Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch() JROOT/libraries/src/Component/ComponentHelper.php:389
12 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/AdministratorApplication.php:142
13 Joomla\CMS\Application\AdministratorApplication->dispatch() JROOT/libraries/src/Application/AdministratorApplication.php:185
14 Joomla\CMS\Application\AdministratorApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:233
15 Joomla\CMS\Application\CMSApplication->execute() JROOT/administrator/includes/app.php:63
16 require_once() JROOT/administrator/index.php:36
4 years ago
·
#219079
0
Votes
Undo
Not sure how this ever worked as this code hasn't changed in some time. On the other hand there is no layouts folder in the rsvp repo.

geraint can you take a look please? I suspect the layouts are being generated as part of the build process as they do not seem to be part of the repo so I cannot see any history in git to determine if there was a change here. The header layout is building the buttons and when it calls renderButton at line 145 the $toolbarButton at this point seems to be a string but an array is expected in the renderButton function.

Ronnie, as a quick test can you cast the $toolbarButton to an array at line 145 of administrator/components/com_rsvppro/layouts/gslframework/header.php just put (array) ahead of the var in the function call. See if that clears it up at least until Geraint can determine what really should be happening here.
4 years ago
·
#219088
0
Votes
Undo
If i change line 145 from:
$buttonoutput = $bar->renderButton($toolbarButton);

to
$buttonoutput = $bar->renderButton((array) $toolbarButton);

i get this error:

Cannot pass parameter 1 by reference

Call stack
# Function Location
1 () JROOT/administrator/components/com_rsvppro/layouts/gslframework/header.php:145
2 include() JROOT/libraries/src/Layout/FileLayout.php:128
3 Joomla\CMS\Layout\FileLayout->render() JROOT/libraries/src/Layout/LayoutHelper.php:73
4 Joomla\CMS\Layout\LayoutHelper::render() JROOT/administrator/components/com_rsvppro/views/abstract/abstract.php:59
5 RSVPAbstractView->display() JROOT/administrator/components/com_rsvppro/controllers/params.php:78
6 AdminParamsController->edit() JROOT/libraries/src/MVC/Controller/BaseController.php:729
7 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/administrator/components/com_rsvppro/rsvppro.php:148
8 require_once() JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:69
9 Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher\{closure}() JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:71
10 Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch() JROOT/libraries/src/Component/ComponentHelper.php:389
11 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/AdministratorApplication.php:142
12 Joomla\CMS\Application\AdministratorApplication->dispatch() JROOT/libraries/src/Application/AdministratorApplication.php:185
13 Joomla\CMS\Application\AdministratorApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:233
14 Joomla\CMS\Application\CMSApplication->execute() JROOT/administrator/includes/app.php:63
15 require_once() JROOT/administrator/index.php:36
4 years ago
·
#219089
0
Votes
Undo
OK, so add a line immediately before it like this:

$tbButton = (array)$toolBarButton;

The change the var in the call to $tbButton

I don't guarantee this will work but I think worth a try.
4 years ago
·
#219090
0
Votes
Undo
I have changed to this


foreach ($toolbarButtons as $toolbarButton)
{
$dbbutton = (array)$toolbarButton;
$buttonoutput = $bar->renderButton($dbbutton);
$buttonoutput = str_replace("btn ", "gsl-button gsl-button-primary ", $buttonoutput);
$buttonoutput = str_replace('class=""', "class='gsl-button gsl-button-primary' ", $buttonoutput);
$buttonoutput = str_replace(array("btn-small"), "", $buttonoutput);
echo $buttonoutput ;
}


and then get this error:

Argument 2 passed to Joomla\CMS\Toolbar\ContainerAwareToolbarFactory::createButton() must be of the type string, null given, called in /var/www/http://www.ableit-dev.dk/www/gasvaerket/libraries/src/Toolbar/Toolbar.php on line 375

Call stack
# Function Location
1 () JROOT/libraries/src/Toolbar/ContainerAwareToolbarFactory.php:40
2 Joomla\CMS\Toolbar\ContainerAwareToolbarFactory->createButton() JROOT/libraries/src/Toolbar/Toolbar.php:375
3 Joomla\CMS\Toolbar\Toolbar->loadButtonType() JROOT/libraries/src/Toolbar/Toolbar.php:347
4 Joomla\CMS\Toolbar\Toolbar->renderButton() JROOT/administrator/components/com_rsvppro/layouts/gslframework/header.php:146
5 include() JROOT/libraries/src/Layout/FileLayout.php:128
6 Joomla\CMS\Layout\FileLayout->render() JROOT/libraries/src/Layout/LayoutHelper.php:73
7 Joomla\CMS\Layout\LayoutHelper::render() JROOT/administrator/components/com_rsvppro/views/abstract/abstract.php:59
8 RSVPAbstractView->display() JROOT/administrator/components/com_rsvppro/controllers/params.php:78
9 AdminParamsController->edit() JROOT/libraries/src/MVC/Controller/BaseController.php:729
10 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/administrator/components/com_rsvppro/rsvppro.php:148
11 require_once() JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:69
12 Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher\{closure}() JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:71
13 Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch() JROOT/libraries/src/Component/ComponentHelper.php:389
14 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/AdministratorApplication.php:142
15 Joomla\CMS\Application\AdministratorApplication->dispatch() JROOT/libraries/src/Application/AdministratorApplication.php:185
16 Joomla\CMS\Application\AdministratorApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:233
17 Joomla\CMS\Application\CMSApplication->execute() JROOT/administrator/includes/app.php:63
18 require_once() JROOT/administrator/index.php:36
4 years ago
·
#219091
0
Votes
Undo
Well I was hoping for a quick and easy 'fix' to get you going but it seems not. Hopefully tonyp or geraint will have a look. It's weekend now so probably not until Monday.
4 years ago
·
#219092
0
Votes
Undo
Well this bug is only on my Joomla 4 development site, all the Joomla 3 sites work with the version 3.6. But it would be nice to be able to get further on the Joomla 4 site ;-) Also - it seems that the club templates are not yet compatible with Joomla 4 . is that correct, and do we have an estimate on that ?
4 years ago
·
#219093
0
Votes
Undo
I did some work with Geraint getting JEvents and RSVP J4 ready and it all seemed to work a few months ago, but I admit I did not test any of the other addons or templates so I can't really answer this. Hopefully the guys will come back to you on Monday, however, I do know Geraint is very busy trying to fix uikit issues and integration issues with other pieces of JEvents and RSVP so fixing a J4 bug right now may not be at the top of his list.
4 years ago
·
#219094
0
Votes
Undo
That is quite allright then :-)
4 years ago
·
#219104
0
Votes
Undo
rbuelund I'm looking into this today

JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!

4 years ago
·
#219107
0
Votes
Undo
I can't recreate this issue - I'm wondering if you have a plugin that is generating additional toolbar items e.g. a general cache cleaner etc.

JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!

4 years ago
·
#219108
0
Votes
Undo
I use Joomla 4 Beta 5 with default template, Only Akeeba Backup and Admin Tools installed - nothing else.
4 years ago
·
#219110
0
Votes
Undo
Can we get super user access to review please?

JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!Join the JEvents club today!

4 years ago
·
#219112
0
Votes
Undo
Details added in this post.
4 years ago
·
#219135
0
Votes
Undo
Hi Ronnie

Is there a backend access key/secret phrase I need too?

JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!

4 years ago
·
#219141
0
Votes
Undo
Ahh yes - sorry. I have updated the details.
4 years ago
·
#219170
0
Votes
Undo
shoujld be working now - strange that it was ok on my server and not on yours!

Anyhow I replicated the code I use in JEvents and that works ok in J4

JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!

4 years ago
·
#219171
0
Votes
Undo
Ok - thanks. Do you know when the club templates wil be compatible with J! 4 ?
4 years ago
·
#219183
0
Votes
Undo
they are very close - will hopefully release them all by the end of the week.

JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!

  • Page :
  • 1
There are no replies made for this post yet.

Members Area

Show your support

Unlike many Joomla calendars we do not charge to download JEvents - please show your support for this project by becoming a member of the JEvents Club Club members get access to early releases, exclusive member support forums, and Silver and Gold members can use many exciting JEvents addons

Your membership will ensure that JEvents continues to be the best events calendar for Joomla.