quickapps / cms

Modular CMS powered by CakePHP
GNU General Public License v3.0
164 stars 69 forks source link

Fatal error: [BadMethodCallException] Method getParam does not exist #184

Closed ghost closed 6 years ago

ghost commented 6 years ago

Hi Developers,

I tried several times to get QA up and running, but unfortunately if I want to call the options or the config in the backend, these errors will be displayed.

Fatal error: [BadMethodCallException] Method getParam does not exist #0 
xxxxxxxxxxx/quickapps.cms-
blogger.eu/blog/vendor/cakephp/cakephp/src/View/Helper/FormHelper.php(2568): 
Cake\Network\Request->__call('getParam', Array) #1 /xxxxxxxxxxx/quickapps.cms-
blogger.eu/blog/vendor/cakephp/cakephp/src/View/Helper/FormHelper.php(1652): 
Cake\View\Helper\FormHelper__AopProxied->_initInputField('idPrefix', Array) #2 
/xxxxxxxxxxxxxx/quickapps.cms-
blogger.eu/blog/vendor/cakephp/cakephp/src/View/Helper/FormHelper.php(280): 
Cake\View\Helper\FormHelper__AopProxied->__call('getConfig', Array) #3 
/xxxxxxxxxxxxxxxxxxxx/quickapps.cms-blogger.eu/blog/vendor/quickapps-
plugins/cms/src/View/Helper/FormHelper.php(51): Cake\View\Helper\FormHelper__AopProxied-
>__construct(Object(CMS\View\View), Array) #4 /xxxxxxxxxxxxxxxxx/quickapps.cms-
blogger.eu/blog/vendor/cakephp/cakephp/src/View/HelperRegistry.php(145): 
CMS\View\Helper\FormHelper__AopProxied->__construct(Object(CMS\View\View), Array) #5 
/xxxxxxxxxxxxxxxxxx/quickapps.cms-blogger.eu/blog/vendor/cakephp/cake in 
/xxxxxxxxxxxxxxxxx/quickapps.cms-
blogger.eu/blog/vendor/cakephp/cakephp/src/Error/ErrorHandler.php on line 156

Debug is active and at least see these errors.

cakephp is in version 3.3.12. There were already such issues here and this solution from there with deleting the /aopdirectory did not help.

What else can I do?

Thank you in advance.

ghost commented 6 years ago

It is up to the tmp directory, which creates itself. If I delete that, I can work in the backend again. If I call another page, the error is present again. How can I handle the /tmp directory better?

Thank you!

botchris commented 6 years ago

Hi,

Try to downgrade your CakePHP version to 3.3.11, which is the version used by CI environments. Just edit your ROOT/composer.json file accordingly and then run composer update cakephp/cakephp.

Also make sure your tmp directory has (recursively) proper permissions.

Hope this help

EDIT: similar to #181

ghost commented 6 years ago

Thanks for the tips and hints. Finally I managed it, but not in shared hosting, but on rootserver under Centos 7 with MariaDB 10.2 and PHP 7.1. Now I can call all pages successfully in the backend.

I forgave the /tmp directory CHMOD 777 and had to delete it several times, the contents of the directory. Also, I downgraded to CakePHP 3.3.16. So it seems to work now.

Somewhat difficult the whole thing, but heck. Somehow it has to work.

Thank you!