Error 500 after installing Joomdle v3.0.1

  • Trageser GmbH
  • Topic Author
  • Offline
  • New Member
  • New Member
More
2 weeks 5 days ago #1 by Trageser GmbH
Error 500 after installing Joomdle v3.0.1 was created by Trageser GmbH
I'm creating a Joomla 5 website that sells Moodle courses via Hikashop. I have Joomdle 2.3.1 installed and some things don't seem to work right, so I tried to install Joomdle 3.0.1. Right after installing it the frontend showed an error 500 message. I followed the instructions from the help page, set errror reporting to maximum and in the frontend got the message 'Undefined constant "HIKASHOP_JS"' in the following file:  .../administrator/components/com_hikashop/helpers/helper.php (line 2114).
The backend is still working, but the Hikashop page shows: "Failed opening required '.../components/com_joomdle/helpers/content.php' (include_path='.:/usr/lib/php8.3') "

In the meantime I restored the website from a backup, but other problems still remain.

Can you tell me what I have to change to make the update work? Maybe with a new version the other problems will disappear.

Please Log in or Create an account to join the conversation.

More
2 weeks 4 days ago #2 by Antonio Durán
Replied by Antonio Durán on topic Error 500 after installing Joomdle v3.0.1
Hi.

> The backend is still working, but the Hikashop page shows: "Failed opening required '.../components/com_joomdle/helpers/content.php'

That is requiring a file that no longet exists, so I guess it is an old plugin? If you are upgrading from Joomdle 2.x to 3.x you need to disable the old plugins:
www.joomdle.com/docs/installation/upgrad...dle-2x-to-joomdle-3x

Please try and let me know if you find any issues.

> 'Undefined constant "HIKASHOP_JS"' in the following file: .../administrator/components/com_hikashop/helpers/helper.php (line 2114).

This is from Hikashop, not related to Joomdle, it just showed because you enabled error reporting.

Please Log in or Create an account to join the conversation.

  • Trageser GmbH
  • Topic Author
  • Offline
  • New Member
  • New Member
More
1 week 3 days ago - 1 week 2 days ago #3 by Trageser GmbH
Replied by Trageser GmbH on topic Error 500 after installing Joomdle v3.0.1
Thank you for your answer. I could update Jommdle without any problems at first.

Now I have a problem with the shop integration. I have installed the newest version of HikaShop and I installed all the plugins (4) from the HikaShop apps integration, but in Joomdle -> Configuration -> Shop there's nothing to select in the Shop Integration field. I'm sure in the old version I could select HikaShop, and did so, but it's not listed here.

And when I click on Joomdle -> Users I get an error message:  Cannot access offset of type string on string

What could be the reason for this?
Last edit: 1 week 2 days ago by Trageser GmbH.

Please Log in or Create an account to join the conversation.

More
1 week 2 days ago #4 by Antonio Durán
Replied by Antonio Durán on topic Error 500 after installing Joomdle v3.0.1
> but in Joomdle -> Configuration -> Shop there's nothing to select in the Shop Integration field

Did you enable the plugins? The one that shows the option in the selector is plg_joomdleshop_hikashop_v2.0.0.zip.

> And when I click on Joomdle -> Users I get an error message: Cannot access offset of type string on string

Is your system check all green?

Please Log in or Create an account to join the conversation.

  • Trageser GmbH
  • Topic Author
  • Offline
  • New Member
  • New Member
More
1 week 1 day ago #5 by Trageser GmbH
Replied by Trageser GmbH on topic Error 500 after installing Joomdle v3.0.1
When I go in the backend to System -> Manage -> Plugins and then on that page enter 'Joomdle' into the search field, I get 6 Plugins:

Joomdle Hikashop profile
Joomdleprofile - Joomla Fields
System - Joomdlehikashop
System - Joomdle HikaShop Groups
Joomdle session
Joomdle - User plugin

I guess the plg_joomdleshop_hikashop_v2.0.0.zip plugin should show up as Joomdleshop – Hikashop or something like that, but it doesn't. I've installed it, twice, to be sure, but it doesn't show it. Could it be hidden somewhere? Or is it one of the 6 that are shown? I don't think so, but who knows. 

Regarding the second point: No, the System Check is not all green, but that may be because out of frustration and momentarily not knowing what I did I clicked the 'Regenerate Joomla token' button and I don't have access to Moodle to change it there, too, and I don't know a way to change it back to the previous token, so Joomdle Web Services is red.

Please Log in or Create an account to join the conversation.

More
1 week 22 hours ago #6 by Antonio Durán
Replied by Antonio Durán on topic Error 500 after installing Joomdle v3.0.1
I checked, and you are right: the name of the plugin shown does not include "Joomdle".
Please search joomdleshop in the Type filter. It will show as Hikashop.
I will add it to my list to fix it for next release.

Please Log in or Create an account to join the conversation.

  • Trageser GmbH
  • Topic Author
  • Offline
  • New Member
  • New Member
More
1 week 57 minutes ago - 1 week 48 minutes ago #7 by Trageser GmbH
Replied by Trageser GmbH on topic Error 500 after installing Joomdle v3.0.1
Thank you, now I can select Hikashop in the Shop Integration field. And at the System Check everything is green again thanks to the people that have access to Mooodle. The next problem (that I had hoped would disppear when Joomdle could access Moodle again) is an error message when opening Components -> Joomdle -> Users and Components -> Joomdle -> Shop. The message is in both cases: 

An error has occurred. 0 Cannot access offset of type string on string

I've set Debug System to Yes and the Users page shows:
Call Stack
Function Location
1  ()  JROOT/administrator/components/com_joomdle/src/Model/UsersModel.php:405
2  Joomdle\Component\Joomdle\Administrator\Model\UsersModel->getJoomlaUsers()  JROOT/administrator/components/com_joomdle/src/Model/UsersModel.php:173
3  Joomdle\Component\Joomdle\Administrator\Model\UsersModel->getData()  JROOT/administrator/components/com_joomdle/src/Model/UsersModel.php:141
4  Joomdle\Component\Joomdle\Administrator\Model\UsersModel->getItems()  JROOT/libraries/src/MVC/View/AbstractView.php:171
5  Joomla\CMS\MVC\View\AbstractView->get()  JROOT/administrator/components/com_joomdle/src/View/Users/HtmlView.php:49
6  Joomdle\Component\Joomdle\Administrator\View\Users\HtmlView->display()  JROOT/libraries/src/MVC/Controller/BaseController.php:697
7  Joomla\CMS\MVC\Controller\BaseController->display()  JROOT/administrator/components/com_joomdle/src/Controller/DisplayController.php:46
8  Joomdle\Component\Joomdle\Administrator\Controller\DisplayController->display()  JROOT/libraries/src/MVC/Controller/BaseController.php:730
9  Joomla\CMS\MVC\Controller\BaseController->execute()  JROOT/libraries/src/Dispatcher/ComponentDispatcher.php:143
10  Joomla\CMS\Dispatcher\ComponentDispatcher->dispatch()  JROOT/libraries/src/Component/ComponentHelper.php:361
11  Joomla\CMS\Component\ComponentHelper::renderComponent()  JROOT/libraries/src/Application/AdministratorApplication.php:150
12  Joomla\CMS\Application\AdministratorApplication->dispatch()  JROOT/libraries/src/Application/AdministratorApplication.php:206
13  Joomla\CMS\Application\AdministratorApplication->doExecute()  JROOT/libraries/src/Application/CMSApplication.php:304
14  Joomla\CMS\Application\CMSApplication->execute()  JROOT/administrator/includes/app.php:58
15  require_once()  JROOT/administrator/index.php:32

And the Shop page: 
Call Stack
#  Function  Location
1  ()  JROOT/plugins/joomdleshop/hikashop/src/Extension/Hikashop.php:88
2  Joomla\Plugin\Joomdleshop\Hikashop\Extension\Hikashop->onJoomdleGetShopCourses()  JROOT/libraries/vendor/joomla/event/src/Dispatcher.php:454
3  Joomla\Event\Dispatcher->dispatch()  JROOT/administrator/components/com_joomdle/src/Helper/ShopHelper.php:42
4  Joomdle\Component\Joomdle\Administrator\Helper\ShopHelper::getShopCourses()  JROOT/administrator/components/com_joomdle/src/Model/ShopModel.php:212
5  Joomdle\Component\Joomdle\Administrator\Model\ShopModel->getTotal()  JROOT/libraries/src/MVC/Model/ListModel.php:325
6  Joomla\CMS\MVC\Model\ListModel->getPagination()  JROOT/administrator/components/com_joomdle/src/Model/ShopModel.php:145
7  Joomdle\Component\Joomdle\Administrator\Model\ShopModel->getItems()  JROOT/libraries/src/MVC/View/AbstractView.php:171
8  Joomla\CMS\MVC\View\AbstractView->get()  JROOT/administrator/components/com_joomdle/src/View/Shop/HtmlView.php:60
9  Joomdle\Component\Joomdle\Administrator\View\Shop\HtmlView->display()  JROOT/libraries/src/MVC/Controller/BaseController.php:697
10  Joomla\CMS\MVC\Controller\BaseController->display()  JROOT/administrator/components/com_joomdle/src/Controller/DisplayController.php:46
11  Joomdle\Component\Joomdle\Administrator\Controller\DisplayController->display()  JROOT/libraries/src/MVC/Controller/BaseController.php:730
12  Joomla\CMS\MVC\Controller\BaseController->execute()  JROOT/libraries/src/Dispatcher/ComponentDispatcher.php:143
13  Joomla\CMS\Dispatcher\ComponentDispatcher->dispatch()  JROOT/libraries/src/Component/ComponentHelper.php:361
14  Joomla\CMS\Component\ComponentHelper::renderComponent()  JROOT/libraries/src/Application/AdministratorApplication.php:150
15  Joomla\CMS\Application\AdministratorApplication->dispatch()  JROOT/libraries/src/Application/AdministratorApplication.php:206
16  Joomla\CMS\Application\AdministratorApplication->doExecute()  JROOT/libraries/src/Application/CMSApplication.php:304
17  Joomla\CMS\Application\CMSApplication->execute()  JROOT/administrator/includes/app.php:58
18  require_once()  JROOT/administrator/index.php:32

Both pages were working before, I'm just not sure I checked after the update from Joomdle 2 to 3.
Last edit: 1 week 48 minutes ago by Trageser GmbH.

Please Log in or Create an account to join the conversation.

More
6 days 22 hours ago #8 by Antonio Durán
Replied by Antonio Durán on topic Error 500 after installing Joomdle v3.0.1
Both cases indicate a problem when getting data from Joomdle.

Is Joomdle check still all green? I don't know the reason, but it seems that no info is really getting to Joomla when it connects to Moodle.

One thing you can test to try to get more info. Edit file:
plugins/joomdleshop/hikashop/src/Extension/Hikashop.php

On line 79 add:
dd($courses);

Then open the Shop page again, to see if you get any info.

Please Log in or Create an account to join the conversation.

  • Trageser GmbH
  • Topic Author
  • Offline
  • New Member
  • New Member
More
6 days 21 hours ago - 6 days 21 hours ago #9 by Trageser GmbH
Replied by Trageser GmbH on topic Error 500 after installing Joomdle v3.0.1
Hm, I added it to line 79. With both semicolons in the line. Is that right? (I don't know much about PHP)
        $c = array(); dd($courses); 
Anyway, the page displayed an error message:
array:4 [▼
"exception" => "core\exception\invalid_parameter_exception"
"errorcode" => "invalidparameter"
"message" => "Ungültiger Parameterwert"
"debuginfo" => "Missing required key in single structure: enrollable_only"
]

Was that right? Does that help you help me?
 
Last edit: 6 days 21 hours ago by Trageser GmbH.

Please Log in or Create an account to join the conversation.

More
6 days 20 hours ago #10 by Antonio Durán
Replied by Antonio Durán on topic Error 500 after installing Joomdle v3.0.1
Yes, that is what I was expecting: for some reason, the parameters are not reaching Moodle on the calls, so it fails.

The system check works because it does not use any parameters in the calls it makes.

I've seen this happening in the past, although a long time ago, so I don't remember the specifics.
I looked it up and found this one:
www.joomdle.com/forum/installation2/1294...ponse-value-detected

On that one, the problem was an incorrect Moodle URL and it presented itself in a weird way, so worth checking it out.

Please Log in or Create an account to join the conversation.