Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
684 views
in Q2A Core by

Below message is shown at my updates page.

Notice: Undefined index: url in /home/mdqa/www/mdqa.jp/qa/qa-include/qa-theme-base.php on line1267

Notice: Undefined index: title in /home/mdqa/www/mdqa.jp/qa/qa-include/qa-theme-base.php on line1267

Is it right that comments is included in record sets? Or has my database broken? 

Q2A version: V1.5.1

1 Answer

+1 vote
by
selected by
 
Best answer

I'm not sure why this is happening, but perhaps it is related to your question at the end. For all the rows in qa_userevents, the qa_userevents.questionid should be the qa_posts.postid of a question in the database, but qa_userevents.lastpostid need to be. Perhaps you can check if that's the case?

by
Hi gideon. I am sorry that I did not reply to you sooner.
Above notice was caused by that answer(qa_posts.type=A) is included in SELECT result. Although it might be problem which is possibly dependent only on my environment, I was repaired by adding WHERE clause to SELECT statement.

qa-db-selects.php : qa_db_user_updates_selectspec()

$selectspec['source'].=
    " JOIN ^posts AS updateposts ON updateposts.postid=fullevents.lastpostid AND updateposts.type IN ('Q', 'A', 'C')".
    " AND (^posts.selchildid=fullevents.lastpostid OR NOT fullevents.updatetype<=>$) AND ^posts.type IN ('Q', 'A', 'C')".
    (QA_FINAL_EXTERNAL_USERS ? '' : ' LEFT JOIN ^users AS eventusers ON fullevents.lastuserid=eventusers.userid').
    ' LEFT JOIN ^userpoints AS eventuserpoints ON fullevents.lastuserid=eventuserpoints.userid'.
    " WHERE qa_posts.type='Q'";  // <<<<<<<<<<<<<<<<

I do not have confidence in change ...
by
That change should be fine. I'll check into this for the next maintenance release.
...