News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

index.php/topic,xxx.html - syntax error, unexpected ','

Started by ladyweb, October 21, 2017, 04:52:29 PM

Previous topic - Next topic

ladyweb

I have already read various threads covering this error and not had any success in finding the cause/cure.

History: forum has moved servers, updated to 2.0.14 from 1.1.18, changed domain names.

The forum appeared to be working OK on the new server with scripts and database updated before I changed domain names - I have run repair_setting.php (twice)

I did notice that, once the forum was made live, the count for reading a new topic stayed at 0 even though looking at the current visitor info did show some visitors as looking at the new topic.

The first error message I had is covered elsewhere:

hxxps://domain.tld/forum/index.php?action=unreadreplies
Database Error: Expression #1 of ORDER BY clause is not in SELECT list, references column 'database.t.id_last_msg' which is not in SELECT list; this is incompatible with DISTINCT
File: /path../wordpress/forum/Sources/Recent.php
Line: 1103

Following the advice to set sql-mode="" sorted out that one. I then commented out the sql-mode="" line in mysql.cnf - do I need to do anything else to return this setting to defaults?

I did try to click on 'new' topics but nothing happened. When I tried to visit any topic, old or new, all I got is the "An Error Has Occurred" page with only "syntax error, unexpected ','" as explanation.

I am able to create new topics but get the error as soon as I try to visit them.

I changed from my theme back to the default theme and I still have the error. I do not have any mods installed. I did try to manually install the SMF-WP bridge as that shows up as an unknown package: all I did was add the mod files to the Sources and Languages directories, and the file within the 'code' tag is not added anywhere as I have not been able to find out in the manual pages what to do with 'code'.
I have not tried to install any other mods as I have not yet found a way around the permissions problem - even setting directories and files to 777 does not allow the automated install scripts to run.

I have added some more English language options to the forum but this has not removed the error.

The home page of the forum displays correctly. I can read PMs. All the Admin pages appear to display correctly.

There is nothing about this syntax error in the SMF error logs. Nor does it show in the server error logs, nor in the mysql error logs.

I have looked through the php files which I suspect are being used to create the topic page to check that they do not have any errors but I may have missed one. I have reinstalled the default theme, just in case. Could it be a javascript error - if so, which file?

Can anyone suggest where I should be looking to find the cause of the error?

My gut feel is that it is in the database somewhere with a field not updating fully with the domain name change. While I am awaiting any replies I will run a file compare between before and after name change databases. I did a quick look through and did not spot anything that can match "t.id_last_msg" - as per the earlier error message above.

Illori


ladyweb

yes- all error logs enabled

Is there a way to increase the level of error logging in SMF? (I'm relatively new to SMF as in this is the first time I have done anything to the backend.)

Illori

if there is an error it should be logged in the server error log if it is enabled.

ladyweb

Quote from: Illori on October 21, 2017, 05:34:33 PM
if there is an error it should be logged in the server error log if it is enabled.

Indeed ... it is very strange that neither the smf logs nor the server logs are picking up the error. That's why I was wondering if it could be somewhere in the javascripts.

I am seeing other php errors - hence why I swapped back to the default theme as one of the earlier steps to find the gremlin - the error logging for php `notice`, `warning` and `fatal error` are all working

ladyweb

I've checked the database for the topic messages and it looks like the ',' are all in the correct place.

the smf_board_permissions table appears to contain the same data as earlier backups although not in the same order.

The domain name has been updated throughout the database.

... and I am starting to run out of ideas of where to look.

(I'm pretty sure the cat did not walk across the keyboard.)

Illori

Quote from: ladyweb on October 21, 2017, 07:59:10 PM
I've checked the database for the topic messages and it looks like the ',' are all in the correct place.

this would be a file error not a database error for , being in the wrong place. you need to know which file is causing the error to look at fixing it.

ladyweb

After sleeping on this problem I decided to follow the simplest route to solve it.

START AGAIN FROM THE BEGINNING!!!

A delete and reinstall of 2.0.14 has the forum working again. Now to go off and test that I haven't broken something else and put back my theme - one file at a time ;) .

Many thanks to those who read the thread. Indeed, the error was in a file somewhere but life was too short to try and find it and a reinstall is so quick and easy.

(Now all I need to do is work out how to mark this as solved.)

Advertisement: