All unread topics -> nothing shown

Started by wormbox, November 26, 2006, 06:54:46 PM

Previous topic - Next topic

wormbox

SMF Version: SMF 1.1 RC3
There has been some posts about this issue, but most of them haven't received any replies, or the solutions suggested haven't worked for my forum. However, I apologize if this issue has been solved.

There's a problem on my forum, which is that "all unread topics" either shows nothing or the same as "show unread posts since last visit". (From the upper left "Hey username. You have x new... Show unread posts since last visit" -> "No unread topics found since your last visit. Click here to try all unread topics." -> "No messages...")

This happens even if there would be tons of old unread topics. Or, as said, "all unread topics" shows what "posts since last visit" shows. I hadn't noticed it before, as, for some reason, it worked fine for me (admin of the board). A member was having this problem and informed me. I logged in using another browser and a test account, and this problem indeed occurs.

The "All unread topics" link ends in "index.php?action=unread;all;start=0".

I have no mods (except the security update for RC3) installed, and I have emptied the following tables:
log_mark_read, log_topics, log_boards

After clearing these tables all of the topics on the board are marked as unread, but none of them show up in "all unread topics", allthough as admin I saw four topics in "posts since last visit" and the same in "all unread topics" until loggin out and back in, after which I see nothing in all unread.

I have also tried deleting forum related cookies, but I guess the problem is elsewhere than in corrupted cookies.

Any help on how to fix this?


cbmr777

I'm having this problem as well...  I have very few mods installed.   :)

SleePy

wormbox or cbmr777,

Where you able to resolve this issue or is it still occuring?

Are you using the latest Version of SMF, 1.1.1?
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

MacDo

I've the same problem, with SMF 1.1.1.
Is there a solution ??

Even if some board icons shows that there is some unread messages, the link "index.php?action=unread;all;start=0" returns nothing. I would like to see the list of all messages unread by the user logged in.

Thank you very much in advance...


SleePy

Do any errors appear in the error log?
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

3nd3r

Yes... As you can see in my previous link posted here.

SleePy

Try to upload Recent.php again from a fresh install of your SMF version.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

3nd3r

#9
Done. Downloaded smf_1-1-1_install.zip, extracted Recent.php, uploaded and overwrote, cleaning browser cache, and...
Same (shame) error. Same logs:

8: Undefined index: ID_MSG_LAST_VISIT
Archivo: .../public_html/Sources/Recent.php
Línea: 754

and
Error en la Base de Datos: You have an error in your SQL syntax;
check the manual that corresponds to your MySQL server version for the right syntax to use near
'AND IFNULL(lt.ID_MSG, IFNULL(lmr.ID_MSG, 0)) < t.ID_LAST_MSG' at line 7
Archivo: .../public_html/Sources/Recent.php
Línea: 755


I've got one more error still unsolved (in that link)...

3nd3r

¿Do you think that repair_settings.php can help me?

MacDo

I have the same problem, and the same error in the log... SMF 1.1.1, no mod installed, original source files. Many thanks for your help...

SleePy

get the upgrade.php and 2 sql files out of the upgrade package and upload those. Then run upgrade.php

I think since it is a fresh file from the install that your database may not be fully upgraded to 1.1.
So running the upgrade should fix your problem.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

3nd3r

#13
Not working. Upgrade ok. Same errors. Same output...  :'(

SleePy

Open up Settings.php

In your database section add this:
$db_show_debug = true;

Try that page again. a bigger error message should occur.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

3nd3r

#15
Ok. This is the result:

On the top of page:Notice: Undefined index: ID_MSG_LAST_VISIT in ****/public_html/Sources/Recent.php on line 754
Error log:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND IFNULL(lt.ID_MSG, IFNULL(lmr.ID_MSG, 0)) < t.ID_LAST_MSG' at line 7
Archivo: ****/public_html/Sources/Recent.php
Línea: 755


SELECT COUNT(*), MIN(t.ID_LAST_MSG)
FROM `pajareon_smf`.smf_topics AS t
LEFT JOIN `pajareon_smf`.smf_log_topics AS lt ON (lt.ID_TOPIC = t.ID_TOPIC AND lt.ID_MEMBER = 1)
LEFT JOIN `pajareon_smf`.smf_log_mark_read AS lmr ON (lmr.ID_BOARD = t.ID_BOARD AND lmr.ID_MEMBER = 1)
WHERE t.ID_BOARD IN (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13)
AND t.ID_LAST_MSG >
AND IFNULL(lt.ID_MSG, IFNULL(lmr.ID_MSG, 0)) < t.ID_LAST_MSG

SleePy

Ahh well that tells me the error.. Are you using the Default verison of Recent.php? If not can you attach me your modified one?

The problem looks like it can't pick up the one of the variables..

QuoteSELECT COUNT(*), MIN(t.ID_LAST_MSG)
FROM `pajareon_smf`.smf_topics AS t
LEFT JOIN `pajareon_smf`.smf_log_topics AS lt ON (lt.ID_TOPIC = t.ID_TOPIC AND lt.ID_MEMBER = 1)
LEFT JOIN `pajareon_smf`.smf_log_mark_read AS lmr ON (lmr.ID_BOARD = t.ID_BOARD AND lmr.ID_MEMBER = 1)
WHERE t.ID_BOARD IN (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13)
AND t.ID_LAST_MSG >
AND IFNULL(lt.ID_MSG, IFNULL(lmr.ID_MSG, 0)) < t.ID_LAST_MSG
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

3nd3r

I think it's the default one... but here it is

SleePy

Can you try this attached file. It will purposely give the error but there is 2 of same code in that area so I need to identify which one is failing.

Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

3nd3r

#19
Same logs in administration log area:
Error en la Base de Datos: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND IFNULL(lt.ID_MSG, IFNULL(lmr.ID_MSG, 0)) < t.ID_LAST_MSG' at line 7
Archivo: ****/public_html/Sources/Recent.php
Línea: 755

and
Aplicar filtro: Mostrar solamente los mensajes de error con el mismo mensaje
8: Undefined index: ID_MSG_LAST_VISIT
Archivo: ****/public_html/Sources/Recent.php
Línea: 754


Putting that code in settings.php:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND IFNULL(lt.ID_MSG, IFNULL(lmr.ID_MSG, 0)) < t.ID_LAST_MSG' at line 7
Archivo: ****/public_html/Sources/Recent.php
Línea: 755


SELECT COUNT(*), MIN(t.ID_LAST_MSG)
FROM `pajareon_smf`.smf_topics AS t
LEFT JOIN `pajareon_smf`.smf_log_topics AS lt ON (lt.ID_TOPIC = t.ID_TOPIC AND lt.ID_MEMBER = 1)
LEFT JOIN `pajareon_smf`.smf_log_mark_read AS lmr ON (lmr.ID_BOARD = t.ID_BOARD AND lmr.ID_MEMBER = 1)
WHERE t.ID_BOARD IN (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13)
AND t.ID_LAST_MSG >
AND IFNULL(lt.ID_MSG, IFNULL(lmr.ID_MSG, 0)) < t.ID_LAST_MSG


Thanks for your assistance... Hope you can fix this!

Advertisement: