Topic-icon Joomla 4 login gives error

Active Subscriptions:

None
1 year 3 months ago #68415 by buztan
Joomla 3 site updated to Joomla 4 gives the following error after loging in with Google account:
ERROR 0 - Cannot access protected property Joomla\CMS\Menu\MenuItem::$params in /var/www/j4.queerspirit.net/components/com_jfbconnect/libraries/utilities.php:183

Any thoughts on why this is happening?  Thanks.
The topic has been locked.
Support Specialist
1 year 3 months ago #68417 by mel
Replied by mel on topic Joomla 4 login gives error
I have an idea on how to reproduce the behavior after looking at the code. Can you confirm how you have your "New User Redirection" and "Returning User Redirection" options set up? Are they pointing at an alias menu item?

-Melissa
The topic has been locked.
Support Specialist
1 year 3 months ago - 1 year 3 months ago #68418 by mel
Replied by mel on topic Joomla 4 login gives error
In /var/www/j4.queerspirit.net/components/com_jfbconnect/libraries/utilities.php at line 183, can you replace
$aliasedId = $item->params->get('aliasoptions');
with
$aliasedId = $item->getParams()->get('aliasoptions');

If this works for you (it fixed the error on my dev site), I'll verify that it doesn't break former Joomla versions before checking it in for the next release.

-Melissa
Last edit: 1 year 3 months ago by mel.
The topic has been locked.
Active Subscriptions:

None
1 year 3 months ago - 1 year 3 months ago #68423 by buztan
Replied by buztan on topic Joomla 4 login gives error
I have things set as follows:
Login with the SCLogin module. The settings for that are:
Login view settings:
Registration Component: JomSocial
Joomla Login Redirection URL: Main menu|Social (this is a menu item alias for JomSocial Frontpage menu item)

JFBConnect settings
New User Redirection: JomSocial menu item 'Edit profile'
Returning User Redirection: JomSocial Frontpage menu item

These settings work fine with J3 but give the error with J4. Interestingly I see the url of the error page is queerspirit.net/component/users/methods?...firsttime&Itemid=101 which is odd as I have logged in many times with that account!

Making the edit you suggested made no difference I'm afraid. In both cases same error and same trace:

ERROR 404 - Page not found in /var/www/j4.queerspirit.net/libraries/src/Router/Router.php:153
Call stack
#    Function    Location
1    ()    JROOT/libraries/src/Router/Router.php:153
2    Joomla\CMS\Router\Router->parse()    JROOT/libraries/sourcecoast/openGraphPlugin.php:112
3    OpenGraphPlugin->getUrlVars()    JROOT/libraries/sourcecoast/openGraphPlugin.php:87
4    OpenGraphPlugin->onOpenGraphAfterDispatch()    JROOT/libraries/src/Plugin/CMSPlugin.php:279
5    Joomla\CMS\Plugin\CMSPlugin->Joomla\CMS\Plugin\{closure}()    JROOT/libraries/vendor/joomla/event/src/Dispatcher.php:486
6    Joomla\Event\Dispatcher->dispatch()    JROOT/libraries/src/Application/EventAware.php:107
7    Joomla\CMS\Application\WebApplication->triggerEvent()    JROOT/plugins/system/jfbcsystem/jfbcsystem.php:152
8    plgSystemJFBCSystem->onAfterDispatch()    JROOT/libraries/src/Plugin/CMSPlugin.php:279
9    Joomla\CMS\Plugin\CMSPlugin->Joomla\CMS\Plugin\{closure}()    JROOT/libraries/vendor/joomla/event/src/Dispatcher.php:486
10    Joomla\Event\Dispatcher->dispatch()    JROOT/libraries/src/Application/EventAware.php:107
11    Joomla\CMS\Application\WebApplication->triggerEvent()    JROOT/libraries/src/Application/SiteApplication.php:205
12    Joomla\CMS\Application\SiteApplication->dispatch()    JROOT/libraries/src/Application/SiteApplication.php:241
13    Joomla\CMS\Application\SiteApplication->doExecute()    JROOT/libraries/src/Application/CMSApplication.php:294
14    Joomla\CMS\Application\CMSApplication->execute()    JROOT/includes/app.php:61
15    require_once()    JROOT/index.php:32
 
Last edit: 1 year 3 months ago by buztan.
The topic has been locked.
Support Specialist
1 year 3 months ago #68427 by mel
Replied by mel on topic Joomla 4 login gives error
This second error is separate from the first error you were having. Which Open Graph plugins do you have enabled?
The topic has been locked.
Active Subscriptions:

None
1 year 3 months ago #68430 by buztan
Replied by buztan on topic Joomla 4 login gives error
The only one enabled is the Google one.
The topic has been locked.
Support Specialist
1 year 3 months ago #68432 by mel
Replied by mel on topic Joomla 4 login gives error
The google plugin is in the 'jfbconnect' group which contains our social network providers. If you go to your Plugin Manager and select 'opengraph' as the group, do you have any of our plugins enabled in that group?
The topic has been locked.
Active Subscriptions:

None
1 year 3 months ago #68433 by buztan
Replied by buztan on topic Joomla 4 login gives error
I have three enabled:

Open Graph - JomSocial
opengraph / jomsocial

Open Graph - Content
opengraph / content

Open Graph - Custom Object
opengraph / custom

I found that if I disable Open Graph - Custom Object then things work again. Not quite sure what that plugin is for? It was only enabled as it was like that under Joomla 3. 
The topic has been locked.
Support Specialist
1 year 3 months ago #68435 by mel
Replied by mel on topic Joomla 4 login gives error
Thanks for letting me know the details. It will help narrow down the issue. The plugins are used for setting the Open Graph tags on your pages correctly. The custom object is generally only for advanced/specific cases.

Do you have any custom objects defined in the JFBConnect backend > Meta > Objects area? If not, you can definitely keep that plugin disabled. However, if you do, could you tell me what the objects configured like?

-Melissa
The topic has been locked.
Active Subscriptions:

None
1 year 3 months ago #68439 by buztan
Replied by buztan on topic Joomla 4 login gives error
Ah yes, seems I did have one set up which I had forgotten about! Disabling that allows things to work with the Open Graph - Custom Object enabled. 

Object Settings
    Extension
        custom
    Layout
        custom
    Name
        Shop
    Object Type
        Article
    Published
        Published

Custom Parameters
    URL Query Parameters
        option=com_eshop
        view=product

    Open Graph tags
        product:clothing
        image=https://queerspirit.net/images/logos/qs_shop_og.png
        description=Queer Spirit shop - buying makes both of us happy, thank you!
The topic has been locked.