But- do me this- go check the db in whatever- ‘Admin- Utilities- SQL Manager- Manage DB Tables’ is fine. How many rows do you have for exp_members, exp_member_homepage and exp_member_data?
Joobs - 27 August 2008 08:01 AM
All three are 70.
It’s doing it right now in one of the private forums… I’ve disabled extensions and the author name isn’t being parsed. So I assume it’s not at extension that’s doing it.
Would a module cause it? If I uninstall a module do I lose all the settings (I think Solspace User module creates new database entries)? But I really don’t get why it appears to be random, the same user name will display correctly other times they have posted.
None of the public forums seem to show it. Can you do a view source on the private forum you’re seeing it on, and cut and paste that cell’s contents into a code block here?
So it’s displaying the profile link correctly but not parsing the {author} tag for some reason.
I am currently using a hacked forum module to remap the URLs but I don’t think that’s the issue as Robin can confirm he has seen the error when i switched back to the default forum php files and theme.
I had a look in exp_forums and “forum_last_post_author” is blank for the forum where the name isn’t showing…
In exp_forums, the values for all the forum_last_post_* appear to be correct (eg member id is there), its just the author screen name that is blank.
I’m wondering if the User module is doing this. I’ve just checked out Crawl Of The Dead which i know uses the User module and one of their forums isn’t displaying author name on the front page. (i’ve made a post on solspace’s forums pointing to this thread)
forum_last_post_author_id contains the right value?
Here are two queries you can run in the SQL manager. Make sure you check the box to display MySQL errors. Replace ‘1’ with whatever the forum id is where the name is not displaying.
SELECT topic_id, title, topic_date, last_post_date, last_post_author_id, screen_name, announcement FROM exp_forum_topics, exp_members WHERE member_id = last_post_author_id AND forum_id = '1' ORDER BY last_post_date DESC LIMIT 1
and
SELECT post_date, author_id, screen_name FROM exp_forum_posts, exp_members WHERE member_id = author_id AND forum_id = '1' ORDER BY post_date DESC LIMIT 1
Please cut and paste the results into a code block here, both the actual query you are running and its results.
I couldn’t get the first one to work, until i removed the quote mark at the end:
SQL Query SELECT topic_id, title, topic_date, last_post_date, last_post_author_id, screen_name, announcement FROM exp_forum_topics, exp_members WHERE member_id = last_post_author_id AND forum_id = '4' ORDER BY last_post_date DESC LIMIT 1 Total Results: 1
Query Result topic_id title topic_date last_post_date last_post_author_id screen_name announcement 103 IP1 ISSUE 28 NEEDS PHOTOGRAPHERS! 1219797456 1219857523 23 LauraBennett n
SQL Query SELECT post_date, author_id, screen_name FROM exp_forum_posts, exp_members WHERE member_id = author_id AND forum_id = '4' ORDER BY post_date DESC LIMIT 1 Total Results: 1
Query Result post_date author_id screen_name 1219857523 23 LauraBennett
They are both seem to be displaying the correct info for the post in question.
Sent the email, and hoping my dodgy coding skills aren’t to blame. I think this was happening before I was messing around with hacks and forum themes though (although not 100% sure).
Thanks, it wouldn’t be a result of the hacks you have in place. Most likely there is an issue with the database, either from the import, or otherwise. The queries I had you run above are the ones used when a new post is made to update the details of the forum. If it’s returning the correct information there, but not being updated in the database, there’s definitely something weird. I’m going to send you a link and some information privately so we can see if we can find out what it is.
I think it’s doing it with comments now too! See here. The author’s name isn’t appearing in the comments (i’ve only just added commenting a couple days ago)
<p><span class="comment-permalink"><a href="#c_{comment_id}">{count}</a></span> {author} | on {comment_date format="%d %F %Y"}</p>
Both comments and the forum front page use the {author} tag to display the author…
I still think this could be related to Solspace User module (i’ve posted a support question in their forums) as i’ve just started looking through the code and can see there is code to update the author name for the comments section and forum last author.
I concur, I do not see a way that EE’s native code would produce this. When a logged in member comments, and you’re using a normal login form, the name column of the database would be filled by their screen name, or username if the screen name is an empty string. Either way, something gets written. And looking at edit_profile() in the User module, this would seem to be the probable source.
I still have a question though, If I update my screen name from the CP it updates on the forums, but it doesn’t update on the comments (comments are members only, and appear to be linked to member accounts). Is that correct behavior?
I was hoping to updating the screen name would reset the blanked out names on the comments. Should I add the screen names in manually to the database?
No, it currently does not do this for comments, though it does for the forum_last_post_author. You’d need to update this in the database. It would be trivial to script, but with fewer than a dozen comments, it would be easiest to just pop in and make the change if you’re comfortable doing so.