Rename Modules returns 500 Server Error

Hi there

I have just installed a fresh installation of 8.2 on my shared CPanel Host

I am getting a 500 server error

"GET /crm/public/legacy/index.php?wizard=StudioWizard&option=RenameTabs&module=Studio&action=wizard HTTP/2" 500 1698 "https://example.com.au/crm/public/index.php" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:105.0) Gecko/20100101 Firefox/105.0"

when I attempt to use the Admin → Rename Modules feature. When I click on it the page is blank. I have run through all of the Admin Repair options and nothing seems to help. I have reset the permissions in terminal.

I have tried reinstalling and still the same issues. There are a couple of things I have noticed which could be related;

  1. There appears to be an issue with the rewrite as between 8.1.3 where my URL was this;

https://example.com.au/crm/index.php

Installing 8.2 now I’m getting;

https://example.com.au/crm/public/index.php

Ive checked config.php and the site_url is set to https://example.com.au/crm/public/. So this seems to be what was set from a fresh install. Is this correct and might this cause the issue?

This is what is in the htaccess

RedirectMatch 301 ^/crm/$ https://example.com.au/crm/public/index.php

This all appears to work except that the URL in the browser is showing public.

  1. I am using PHP v8.0. I ended up changing back to 7.4 and had the same issue but im wondering if its related.

Do any of you have any ideas? I changed to 8.2 to fix the issues I was having with dates defaulting to UTC instead of Australian Standard Time, which is fixed, but now I cant rename the modules. This is quite frustrating. I accept it could likely be an issue with the shared host but right now, it does not appear to be.

Regards

Ross.

And just like that, I seem to have figured it out. I changed back to 7.4php and now its working. Anyone have any ideas why this is working? I was certain I had already tried this, appears I in fact had not!

In php 8 there is an non static methods cannot be called as statuc methods. Php returns a fatal error for it. While in 7.4 it is allowed/does not throw fatal error. I can’t recall the exact file name but In a file related to rename modules a non static function is being called statically. I’ll post more details when I am on my pc

Line number 339 in public/legacy/modules/Studio/wizards/RenameModules.php
Change from
$buttonTxt = StudioParser::buildImageButtons($buttons);
To
$buttonTxt = (new StudioParser)->buildImageButtons($buttons);

It would make rename modules working in php 8.0 as well

Thanks mate. Why wouldnt this have been included in 8.2?

Its just a bug that’s not been fixed

Legend! that worked. Thanks!

Is there a PR for this on GitHub, already?

Not sure about that sorry. How would I go about checking that?

Also, @abuzarfaris , now that that button is fixed, when I now attempt to submit a rename of a module, I am getting a 500 after clicking the Save button. I am going to attempt to resolve this myself but if any knows the fix, that would be very much appreciated.

The error is occurring in;

POST https://shinemoveandplay.com.au/crm/public/legacy/index.php

In the file public/legacy/modules/Studio/wizards/RenameModules.php

Change line 808 to
(new DropDownHelper)->saveDropDown($_REQUEST);
Change line 815 to
(new DropDownHelper)->saveDropDown($this->createModuleListSingularPackage($newParams, $this->changedModules));
Change line 826 to
(new DropDownHelper)->saveDropDown($this->createModuleListSingularPackage($newParams, array($moduleName => $this->changedModules[$moduleName])));
Same problem non static method being called statically

Yes I added the PR yesterday

1 Like

Wow thanks again, great help.

incidentally, I just installed 7.12.7 and it has the same code causing a 500.

Yes you will have to make similar fixes in 7.x as well if you are using php 8

This one has been bugging me for a while now - fixes above mentioned did not yet fix it either.

Suite V 8.0.3
php 7.4

When clicking on the Rename Modules within admin - returns “There is no action by that name: Wizard” only.