Page 1 of 1

My first item in the questbook. Nothing Shows up in frontPage

Posted: 16 May 2022, 10:46
by Milian
Hi,
Installed com_phocaguestbook_v4.0.0 om a Joomla 4.1.3 website
with PHP 8.0.18.

After I put my first item in the questbook. Nothing Shows up in the front-page:

I found out that this item was not present in the mySQL database.

When add an item in the Administrator this item _ _ up.
But visitors must add an item in the front page op the questbook.

What to do?
No errors shows up.

Regards, Milian

Re: My first item in the questbook. Nothing Shows up in frontPage

Posted: 17 May 2022, 12:32
by StavrosZ
Same happened to me after I upgraded a website from Joomla 3 to Joomla 4.

Upgrading from Guestbook version 3 to Guestbook version 4 presented me the problem you described.
Similarly I experienced the same problem after having installed the version 4 afresh and copied/transfered (with phpMyAdmin) the "phocaguestbook_items" database table from the Guestbook version 3 to the Guestbook version 4.

The only feasible way for me was to install the version 4 afresh and manually record the posts one by one in the backstage. Thankfully my website did not had too many entries. Now everything is working O.K.

It seems that the version 4 front page cannot write into a version 3 created table.
I use PHP 8 and MariaDB.

Re: My first item in the questbook. Nothing Shows up in frontPage

Posted: 17 May 2022, 20:54
by MusicMike
I ran into the same problem on my local test installation. After some investigation I believe the issue is related to the date and checked_out_time fields in the phocaguestbook_items table. By definition, those two fields should have a default value of 0000-00-00 00:00:00 which was not allowed on my MySQL database (this was prohibited, use the "SHOW VARIABLES LIKE 'sql_mode' ;" to check how your database is configured), so they had a different default value which prevented the post being written to the database.

Once I allowed this zero value (I had to change the MySQL settings) and adjusted the two fields, the post was successfully written to the database. What is unclear to my is why this was not an issue under Joomly 3.9 and why it gives us headaches under Joomla 4.0...

Re: My first item in the questbook. Nothing Shows up in frontPage

Posted: 23 May 2022, 13:14
by Milian
Well, I installed a fresh com_phocaguestbook_v4.0.0 on Joomla 4,1,3 and default date and checked_out_time fields in the phocaguestbook_items table
are set twice to: 0000-00-00 00:00:00. So even from a clean install PhocaGuestbook shows nothing on the front page because noting was saved in the mySql.

I wonder why Phoca is not fixing this after reading this issue.

Re: My first item in the questbook. Nothing Shows up in frontPage

Posted: 25 May 2022, 23:51
by Jan
Hi Milian, there are thousands of combinations of different server settings, so it is not so easy to change something (as mostly if you change something and it starts working for one user, it stops working for other hundred of users)

Are you able to debug your page, to see which error do you get exactly there? So I can simulate it, test it and add some new solution there?

Jan

Re: My first item in the questbook. Nothing Shows up in frontPage

Posted: 03 Jun 2022, 21:36
by MusicMike
Just came across this for Joomla 4: "Joomla 4 will only use NULL date defaults. The use of the invalid default date of 0000-00-00 00:00:00 in Joomla 4 has been deprecated." (see https://docs.joomla.org/Potential_backw ... n_Joomla_4). Could this be the problem?

Re: My first item in the questbook. Nothing Shows up in frontPage

Posted: 07 Jun 2022, 14:20
by Jan
Hi, try to install the newest version, version 4.0.1:

https://www.phoca.cz/download/category/ ... -component

datetime values changed there:

https://github.com/PhocaCz/PhocaGuestbo ... 92f566e17e

and let me know if this is OK.

Be aware, obsolete version needs to be uninstalled (all data will be lost) because only new install will create database structure with newly defined columns.

Jan