|
PHP warnings 2 Years ago
|
|
|
I've just installed JCollection and I've got PHP warnings all over the place.
On the new item scrren in the backend I have these warnings:
Notice: Constant _JC_PATH already defined in /var/www/html/dev/administrator/components/com_jcollection/controller.php on line 19
Notice: Constant _JC_PATH already defined in /var/www/html/dev/administrator/components/com_jcollection/views/item/view.html.php on line 19
Notice: Undefined variable: option in /var/www/html/dev/administrator/components/com_jcollection/models/item.php on line 84
Notice: Undefined variable: option in /var/www/html/dev/administrator/components/com_jcollection/models/item.php on line 94
Notice: Undefined property: stdClass::$params in /var/www/html/dev/administrator/components/com_jcollection/views/item/view.html.php on line 44
Notice: Undefined property: stdClass::$id in /var/www/html/dev/administrator/components/com_jcollection/views/item/view.html.php on line 48
Notice: Undefined property: stdClass::$catid in /var/www/html/dev/administrator/components/com_jcollection/views/item/view.html.php on line 88
Notice: Undefined property: stdClass::$catid in /var/www/html/dev/administrator/components/com_jcollection/views/item/view.html.php on line 93
Notice: Undefined property: stdClass::$ordering in /var/www/html/dev/libraries/joomla/html/html/list.php on line 125
Notice: Undefined property: stdClass::$id in /var/www/html/dev/administrator/components/com_jcollection/views/item/view.html.php on line 107
Notice: Undefined property: stdClass::$img in /var/www/html/dev/administrator/components/com_jcollection/views/item/view.html.php on line 126
Notice: Undefined property: stdClass::$img in /var/www/html/dev/administrator/components/com_jcollection/views/item/tmpl/default.php on line 5
One even appears in the Name field for the new item:
<br /> <b>Notice</b>: Undefined property: stdClass::$name in <b>/var/www/html/dev/administrator/components/com_jcollection/views/item/tmpl/default.php</b> on line <b>28</b><br />
There's also some for each page of the JCollection section in the back-end, as well as one on the default JCollection view on the front end.
So many problems makes we wonder if I have something configured incorrectly. I'm running PHP 5.2.9 on Apache, using CentOS.
Does anyone know what could be going wrong?
|
|
|
|
|
|
|
Re: PHP warnings 2 Years ago
|
|
|
Hi,
no, there is nothing wrong, as the messages say, those are "notices". You can adjust the level of such debug outputs by using appropriate settings in your php.ini file, and/or by using the corresponding Joomla (global) settings and/or by adjusting the settings in the file "/administrator/components/com_jcollection/config.jcollection.php". Nonetheless, at least in the frontend I tried to get rid of all notices, so there should not be too many. Anyway, in a live site is is usually not a good idea to have verbose PHP debug outputs.
HTH,
Thorsten.
|
|
|
|
|
|
|
Re: PHP warnings 2 Years ago
|
|
|
Ah ok fair enough. I do have error messages turned off on the live site, this is just a development one. I just haven't come across such warnings in a Joomla addon before, so I thought I'd better work out if there was something wrong.
Thanks for clearing that up.
|
|
|
|
|
|
|
Re: PHP warnings 2 Years ago
|
|
|
Actually it looks like you might need to turn off the PHP warnings for JCollection to work properly. I can't seem to add an item on my dev site which has PHP warnings on - I click "save" on the create new item page and then I'm returned to the item listing page with no new item appearing. But on the live site, which has the PHP warnings turned off, adding an item works fine.
It's possible something else is causing this, but the PHP warnings are the only significant differences between the two environments that I know off.
|
|
|
|
|
|
|
Re: PHP warnings 2 Years ago
|
|
|
Hi,
it is most likely that the PHP notices disturb the AJAX-calls on the "edit item" page and hence it does not work properly (this is the only place where AJAX is used in the backend).
Thorsten.
|
|
|
|
|
|
|