Vox Populi(x) forum

Alexandria Book Library => Supporto (Support) => Topic started by: miguelcorreia on 24 August 2018, 13:14:01

Title: Error 500 while saving item fields on Backend
Post by: miguelcorreia on 24 August 2018, 13:14:01
Hi,
I've been using Abook for a while, and I'm quite happy with it.
Recently we needed to upgrade our servers and I'm for days struggling with getting this extension to work properly on a new installation.
Everything goes well with the instalation of the component, module and plugins, but there a couple of 500 errors occuring sistematically on the backend (and also in the frontend when when you try to visualize those items).

The editor works fine, and you can fill the fields either be books, authors, editors, etc, but when you save it returns a 500 error. The only exception is the category item wich seems to be working fine and saves without problems.

I've also tried to import the old book database from the other server, and everything goes well, until you try to edit (save) the changes.

First I thought it was a problem with configuration of the server, but we've tested a couple of versions and I did also another installation on another server (Linux) and I got the exact same error, so I suspect it's not a configuration issue, but a problem with this version of Alexandria Book Library, and, unfortunately there's no way to get older versions to see if there was any behaviour differences.

I'm stuck at this point and really like some help here.

These is my actual server specs:

- Joomla 3.8.11 (also tested with lower joomla fresh installations: 3.8.6, and 3.7)
- Windows Server 2016
- PHP 7.2.8
- PHPMyAdmin 4.8.2
- MySQL 8.0.12

Also tried with : Linux / Php 7.2.9 / Apache 2.4.34

Hope I hear from you guys soon. Many thanks.
Title: Re: Error 500 while saving item fields on Backend
Post by: federica on 27 August 2018, 10:46:57
Hi Miguel,
which Abook version are you using?
The right sequence to migrate Abook to another server is the follow:
- on new server install the same abook version old server
- sql export from old server using abook export tool
- sql import to new server using abook import tool
- then updates Abook to the latest version if it needs to

If you have follow the previous steps I suggest also to check:
- if folders and file permissions are right
- if php errors occours
- if SEF is enable properly (try to disable it at the moment to test frontend pages)
- if articles and categories edit works witout problem
Title: Re: Error 500 while saving item fields on Backend
Post by: miguelcorreia on 27 August 2018, 15:15:47
Hi Federica, thanks for your reply.

I've tried a couple of things.
1) A Fresh instalation (Last version of Joomla and Abook 3.14), and the error happens with a new record.
2) Also done a backup and the import was sucessful. However when I try to edit an item (except for Categories), the 500 error occurs.

Folders and files permission are okay
Tried with SEF enable and disabled.
Articles and categories work just fine.

Same thing happens with two different servers settings.
Title: Re: Error 500 while saving item fields on Backend
Post by: federica on 29 August 2018, 09:46:47
Abook demo site runs well on php7.1 but I haven't make a test on php 7.2.
Try to downgrade php to 7.1.
Title: Re: Error 500 while saving item fields on Backend
Post by: miguelcorreia on 12 September 2018, 15:24:56
Fixed. It was on my end. The server was not well configured.
Thanks.
Title: Re: Error 500 while saving item fields on Backend
Post by: federica on 13 September 2018, 15:01:12
Many thanks miguel!
If you are satisfied with Abook do you not forgot to post a review of Abook in joomla JED (https://extensions.joomla.org/extension/alexandria-book-library/). I would really appreciate it.
Title: Re: Error 500 while saving item fields on Backend
Post by: Slacker on 15 September 2018, 18:56:36
I have used latest Abook with PHP 7.2 and it works very well for me. In error log I have found these errors:

Backend log: PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /components/com_abook/models/book.php on line 58\n,
PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /components/com_abook/helpers/icon.php on line 138\n,
PHP Notice:  Trying to get property 'id' of non-object in /components/com_abook/views/book/view.html.php on line 240\n
PHP Notice:  Trying to get property 'id' of non-object in /components/com_abook/views/book/view.html.php on line 239\n

Most errors seems icon.php produce. But just minor issues of a great and very useful extension.
Title: Re: Error 500 while saving item fields on Backend
Post by: federica on 05 November 2018, 16:51:09
Hi Slacker,
I will fix the errors, thanks for your notice.