Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Still Can't Rename Modules #9574

Closed
bitnamiNoob opened this issue May 3, 2022 · 9 comments · Fixed by #9643
Closed

Still Can't Rename Modules #9574

bitnamiNoob opened this issue May 3, 2022 · 9 comments · Fixed by #9643
Labels
Area: PHP8 Issues & PRs related to the CRM when using PHP8 Priority:Important Issues & PRs that are important; broken functions, errors - there are workarounds Status:Fix Proposed A issue that has a PR related to it that provides a possible resolution Status: Team Investigating Labels for issues in which the Core Team are investigating / Intend to Investigate Type: Bug Bugs within the core SuiteCRM codebase

Comments

@bitnamiNoob
Copy link

bitnamiNoob commented May 3, 2022

Hello. I hope your day is going well. I just wanted to reach out, because I am having an issue with renaming modules.

ISSUE
Renaming modules seems to be broken

EXPECTED BEHAVIOR
Renaming a module should change the modules name via the label functionality.

ACTUAL BEHAVIOR
A white screen is shown and PHP errors logged.

STEPS TO REPRODUCE
Open Admin
Got to “Rename Modules”
Attempt to switch the name of any core module
See the error
Context
Attempting to rename a module is no longer possible.

ALTERNATE STEPS TO REPRODUCE
Open Admin
Go to "Configure Module Menu Filters"
Edit module names and/or move filters around
Click "Save & Deploy"
See Blank screen and no changes were made

LOG FILE ERRORS

PHP Warning: Undefined array key “moduleList” in /bitnami/suitecrm/cache/smarty/templates_c/%%F60^F609237E%%_headerModuleList.tpl.php on line 28PHP

PHP Warning: Undefined array key “Administration” in /bitnami/suitecrm/cache/smarty/templates_c/%%F60^F609237E%%_headerModuleList.tpl.php on line 72PHP

PHP Warning: Undefined array key “Administration” in /bitnami/suitecrm/cache/smarty/templates_c/%%F60^F609237E%%_headerModuleList.tpl.php on line 215PHP

PHP Warning: Undefined array key “LBL_SEARCH_BUTTON” in /bitnami/suitecrm/cache/smarty/templates_c/%%F60^F609237E%%_headerModuleList.tpl.php on line 662PHP

PHP Fatal Error: Uncaught Error: Non-static method StudioParser::buildImageButtons() cannot be called statically in /bitnami/suitecrm/modules/Studio/wizards/RenameModules.php:339\nStack trace:\n#0 /bitnami suitecrm/modules/Studio/wizards/RenameModules.php(284): RenameModules->display()\n#1 /bitnami/suitecrm/modules/Studio/wizards/StudioWizard.php(94): RenameModules->process()\n#2 /bitnami/suitecrm/modules/Studio/wizards/StudioWizard.php(64): StudioWizard->process()\n#3 /bitnami/suitecrm/include/MVC/View/SugarView.php()823): include_once(’…’)\n#4 /bitnami/suitecrm/include/MVC/View/views/view.classic.php(72): SugarView->includeClassicFile()\n#5 /bitnami/suitecrm/include/MVC/View/SugarView.php(210): ViewClassic->display()\n#6 /bitnami/suitecrm/include/MVC/Controller/SugarController.php(432): SugarView->process()\n#7 /bitnami/suitecrm/include/MVC/Controller/SugarController.php(363): SugarController->processView()\n#8 /bitnami/suitecrm/include/MVC/SugarApplication.php(101): SugarController->execute()\n#9 /bitnami/suitec…’, referer: http://192.168.0.25/index.php?module=Administration&action=index

TROUBLESHOOTING STEPS
I have confirmed that all of the permissions on/in the suitecrm directory are correct by running the following commands (daemon is the default user for the VM instance created by Bitnami here: https://bitnami.com/stack/suitecrm/virtual-machine):

sudo chown -R daemon:daemon .
sudo chmod -R 755 .
sudo chmod -R 775 cache custom modules themes data upload
sudo chmod 775 config_override.php 2>/dev/null

Reference: https://docs.suitecrm.com/admin/installation-guide/downloading-installing/#_copying_suitecrm_files_to_web_server

It appeared to be a similar issue to this one (#9496); however, I have verified that my DropDownHelper.php config file has the correct, updated values

ENVIRONMENT
SuiteCRM Version used: 7.12.5
PHP 8.0.17
Chrome and Firefox
I am using the Bitnami VM found here: SuiteCRM Virtual Machines
Are there any work-arounds or patches that I can install?

Any help you could provide would be greatly appreciated.

Thank you in advance!

@pgorod
Copy link
Contributor

pgorod commented May 4, 2022

Probably caused by this

https://php.watch/versions/8.0/non-static-static-call-fatal-error

here:

https://github.com/salesagility/SuiteCRM/blob/master/modules/Studio/parsers/StudioParser.php#L164

which should be easy to solve by making that function explicitly "static"

@bitnamiNoob
Copy link
Author

Thank you so much for the very helpful information. That worked to get me past the first blank screen, and I was able to access the page which allows for those modules to be renamed. However, I then started receiving another Fatal error after saving the changes. This new error was similar and said the following:

PHP Fatal error: Uncaught Error: Non-static method DropDownHelper::saveDropDown() cannot be called statically in /bitnami/suitecrm/modules/Studio/wizards/RenameModules.php…

Using the same (very helpful) solution you provided for the first one, I was able to make the same change for this method by locating which config file it was in, and then adding “static” to that line of code. In case someone else comes across the same issue, I used grep to locate that config file as follows:

grep -i -r “public function saveDropDown” /bitnami/suitecrm/

Then I updated “public function saveDropDown…” to “public static function saveDropDown…”

I don’t see any other Fatal errors at the moment, so I hope it stays that way. I really appreciate your assistance with this. That was incredibly helpful.

@pgorod
Copy link
Contributor

pgorod commented May 4, 2022

Allow me to re-open. This still needs to be fixed! :-)

Which should be easy now that we know where to fix it - including that second place you discovered.

I'll make a PR if I find the time, and it will be linked to this Issue.

@pgorod pgorod reopened this May 4, 2022
@bitnamiNoob
Copy link
Author

Oh, that would be wonderful! Thank you very much. I really appreciate your help. :-)

@johnM2401 johnM2401 added Type: Bug Bugs within the core SuiteCRM codebase Priority:Important Issues & PRs that are important; broken functions, errors - there are workarounds labels May 5, 2022
@SuiteBot
Copy link

SuiteBot commented May 5, 2022

This issue has been mentioned on SuiteCRM. There might be relevant details there:

https://community.suitecrm.com/t/cant-rename-modules/84882/15

@jakarina
Copy link

I also have the same issue on my fresh setup. I hope the team address this issue soon and get it fixed.

@pgorod
Copy link
Contributor

pgorod commented Jun 12, 2022

@jakarina have you tried going here

https://github.com/salesagility/SuiteCRM/blob/master/modules/Studio/parsers/StudioParser.php#L164

and changing that "public function" to "public static function" ?

@jpblonshine
Copy link

jpblonshine commented Jul 15, 2022

Has there been any progress on a solution? I too have updated the code and am now stuck at the second screen.

I am running SuiteCRM 8.1.2-6 on AWS with PHP 8.0.20

Already changed public function to public static function. All permissions are verified as correct.

@pgorod
Copy link
Contributor

pgorod commented Jul 16, 2022

Any FATALs in the logs at the time that "second screen" (whatever that is exactly) is loading?

@johnM2401 johnM2401 added the Area: PHP8 Issues & PRs related to the CRM when using PHP8 label Oct 20, 2022
pgorod pushed a commit to pgorod/SuiteCRM that referenced this issue Feb 27, 2023
@gemartin21 gemartin21 added the Status: Team Investigating Labels for issues in which the Core Team are investigating / Intend to Investigate label Apr 11, 2023
@gemartin21 gemartin21 added the Status:Fix Proposed A issue that has a PR related to it that provides a possible resolution label Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: PHP8 Issues & PRs related to the CRM when using PHP8 Priority:Important Issues & PRs that are important; broken functions, errors - there are workarounds Status:Fix Proposed A issue that has a PR related to it that provides a possible resolution Status: Team Investigating Labels for issues in which the Core Team are investigating / Intend to Investigate Type: Bug Bugs within the core SuiteCRM codebase
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants