bug
avatar brianteeman
brianteeman
3 Sep 2014

Steps to reproduce the issue

Try opening any of the issues created today
http://issues.joomla.org/tracker/jtracker/473
http://issues.joomla.org/tracker/joomla-cms/4210
http://issues.joomla.org/tracker/joomla-cms/4209

Expected result

they open

Actual result

stack trace
0 Twig_Error_Runtime
An exception has been thrown during the rendering of a template ("Unknown status id:0") in "issue.index.twig" at line 93.

System information (as much as possible)

Additional comments

avatar brianteeman brianteeman - open - 3 Sep 2014
avatar b2z b2z - change - 3 Sep 2014
Labels Added: bug
avatar brianteeman
brianteeman - comment - 3 Sep 2014

FYI I tested and it doesnt matter if the issue was created first on JIssues or on github

avatar b2z
b2z - comment - 3 Sep 2014

That's weird... I just synced all issues locally and do not have this error :confused: Interesting thing is that http://issues.joomla.org/tracker/joomla-cms/4215 is opening... Will try to debug.

avatar b2z
b2z - comment - 3 Sep 2014

Ok it seems that for these issues throwing an error there is an incorrect status with ID=0. If status = 0 this code throws an exception.

@mbabker may be this commit 4c757cc affected it? Currently these issues have incorrect status:

  • joomla-cms: 4208 - 4214
  • jissues: 471, 473, 474

Can you correct status in DB please? Thank you!

avatar mbabker
mbabker - comment - 3 Sep 2014

Maybe? Previously, the default was setting $status = 1;. I think we need to add an is_null() check when we're building the data array to pass into the Table object to not update the field.

avatar mbabker
mbabker - comment - 3 Sep 2014

I committed and deployed 4a5c541 so let's see what happens.

avatar roland-d
roland-d - comment - 3 Sep 2014

@mbabker I still can't open the issues. See this image:
issues_stacktrace

avatar mbabker
mbabker - comment - 3 Sep 2014

The issues will need to be updated in the database, the code I changed only affects the processing during save actions. Guess I'll have to do that too...

avatar mbabker
mbabker - comment - 3 Sep 2014

Updated.

avatar n9iels
n9iels - comment - 3 Sep 2014

i can't open all issues that has a label like "PR-starting", "RTC", etc

avatar zero-24
zero-24 - comment - 3 Sep 2014

@mbabker the links by @brianteeman still send me the error.

avatar mbabker
mbabker - comment - 3 Sep 2014

Grr...

mysql> SELECT status, title FROM #__issues WHERE issue_number = 473 AND project_id = 2;
+--------+----------------------------------------------------+
| status | title                                              |
+--------+----------------------------------------------------+
|      1 | Editing a item using the JTracker remove some code |
+--------+----------------------------------------------------+

It's not an issue with the status in the database at this point, at least for that item.

avatar mbabker
mbabker - comment - 3 Sep 2014

Also just to confirm there's no other issues with a bad status ID:

mysql> SELECT status, issue_number, project_id FROM #__issues WHERE status NOT IN (SELECT id FROM #__status);
Empty set (0.01 sec)
avatar b2z
b2z - comment - 3 Sep 2014

Emm... What's happening then? :ambulance:

avatar mbabker
mbabker - comment - 3 Sep 2014

Your guess is as good as mine. The line it's erroring at is part of the item.easy check in the layout file. I'm looking at every record for CMS items 4207 and later in the database (4207 looks to be the last good one), it's all valid from what I can see.

avatar mbabker
mbabker - comment - 3 Sep 2014
avatar mbabker
mbabker - comment - 3 Sep 2014

Figured out it's related to the activities stream.

avatar b2z
b2z - comment - 3 Sep 2014

Ah ok :) Glad that we sorted out. I see that they are opening now :+1::smile_cat:

avatar mbabker
mbabker - comment - 3 Sep 2014

Only because I'm hacking out the rows from the template. As soon as I revert the change it breaks again. It's this block that's causing the failure.

avatar mbabker
mbabker - comment - 3 Sep 2014

Figured it out. The bad data inserts caused bad records in the activity stream. Fixing the database up massively now.

avatar roland-d
roland-d - comment - 3 Sep 2014

:bowtie:

avatar mbabker
mbabker - comment - 3 Sep 2014

All the bad data has been purged.

avatar mbabker mbabker - change - 3 Sep 2014
Status New Closed
Closed_Date 0000-00-00 00:00:00 2014-09-03 19:40:52
avatar mbabker mbabker - close - 3 Sep 2014
avatar mbabker mbabker - close - 3 Sep 2014
avatar roland-d
roland-d - comment - 3 Sep 2014

Almost, I can open the ones @brianteeman mentioned but I can't open this one now:
http://issues.joomla.org/tracker/joomla-cms/4197

It is a tracker I created myself.

avatar mbabker
mbabker - comment - 3 Sep 2014

No clue what you're talking about, it works just fine :wink:

avatar roland-d
roland-d - comment - 3 Sep 2014

Must be the :beers: talking :tongue:

avatar zero-24
zero-24 - comment - 3 Sep 2014

@roland-d what issue do you get?

Something like: 1 RuntimeException Invalid Issue?

I can confirm it but only if you open it with the same browser as you allready open a link to JTracker (e.g. http://issues.joomla.org/tracker/jtracker/473)

It should work if you use a other browser. (or close the current browser and reopen the site)

good work @mbabker all good now. Except for the bahavior above but if @roland-d can confirm it (get the same error message) it is a other issue.

avatar roland-d
roland-d - comment - 3 Sep 2014

@zero-24 It was the same error as before. Nothing like the error you mention nor can I reproduce that error.

avatar zero-24
zero-24 - comment - 3 Sep 2014

hmm ok thanks @roland-d so possibly a issue on my side :D

Add a Comment

Login with GitHub to post a comment