Loading...
 
Skip to main content

Comments to Image Galleries cause failure in mod-since_last_visit_new.php causing site crash

Status
Closed
Subject
Comments to Image Galleries cause failure in mod-since_last_visit_new.php causing site crash
Version
1.9.x
Category
  • Error
Feature
Comment
Database MySQL (MyISAM)
Image Gallery
Modules
Resolution status
Out of Date
Lastmod by
Bernard Sfez / Tiki Specialist
Rating
(0)
Description

When any user creates a comment for an image gallery all users with the since_last_visit_new module active will not be able to access the site. Instead they will receive this error message:

Notice: Undefined index: list in /hsphere/local/home/stdiddl/breakingpaint.com/BP2/modules/mod-since_last_visit_new.php on line 87

Excerpt_from_line_86
Copy to clipboard
if (!isset($perm) || $userlib->user_has_perm_on_object($user,$res['object'], $res['objectType'], $perm)) { if ($ret["items"]["comments"]["list"][$count]["href"]) $ret["items"]["comments"]["list"][$count]["href"] .= '&comments_show=y#threadId'.$res['threadId']; $ret["items"]["comments"]["list"][$count]["title"] = $tikilib->get_short_datetime($res["commentDate"]) ." ". tra("by") ." ". $res["userName"]; $ret["items"]["comments"]["list"][$count]["label"] = $res["title"]; $count++;


Recreating the problem:

  1. Enable comments for image galleries in Admin>general
  2. Enable the module since_last_visit_new
  3. Create an image gallery if one does not already exist
  4. view an image gallery and post a comment

Solution

Solution if you discovered this bug the hard way:

  1. open your MySql database
  2. browse the tiki-comments table
  3. sort by date created to find the latest comment
  4. delete the offending comment
  5. wait about 10 minutes for everything to recover (I don't know why)
  6. close all browsers and try visiting the site again


Preventive solution:

  1. go to Admin>general
  2. uncheck the box allowing comments in image galleries
Priority
25
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
488
Created
Sunday 22 January, 2006 20:08:02 UTC
by Unknown
LastModif
Tuesday 05 October, 2021 08:49:11 UTC


Show PHP error messages