Page MenuHomePhabricator

LQT Call to a member function ... on a non-object at different places
Open, MediumPublic

Description

Author: dasch

Description:
PHP Fatal error: Call to a member function article() on a non-object in /var/www/web0/html/extensions/LiquidThreads/pages/ThreadPermalinkView.php on line 13


Version: unspecified
Severity: critical

Details

Reference
bz17553

Related Objects

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:31 PM
bzimport set Reference to bz17553.
bzimport added a subscriber: Unknown Object (MLST).

davemccabe wrote:

Please provide steps to reproduce.

dasch wrote:

Sometimes when trying to save a discussion and sometimes when trying to read discussions

dasch wrote:

Other Errors in LQT I found in my errorlog

PHP Fatal error: Call to a member function article() on a non-object in /var/www/web0/html/extensions/LiquidThreads/pages/ThreadPermalinkView.php on line 13

PHP Fatal error: Call to a member function getText() on a non-object in /var/www/web0/html/extensions/LiquidThreads/LqtBaseView.php on line 929

dasch wrote:

Another Fatal error, now when reaplying to a thread

Call to a member function id() on a non-object in /var/www/web0/html/extensions/LiquidThreads/classes/LqtHistoricalThread.php on line 46

dasch wrote:

The Thread ist shown in Recent Changes but is to accesible and is not disblayed under the Thread it's a reply to

dasch wrote:

somebody working on this? my users are complaining a lot about this bug

Are these errors still occurring? Is there something that can be done to reliably reproduce the errors?

davemccabe wrote:

I haven't found any way to reproduce these bugs or any suspected causes from analysis.

Bug reporters should also always give their SVN revision numbers, or line numbers are at best line neighborhoods.

They should also refrain from capriciously commenting out code as described in #7. That's a sure way to corrupt their databases.

dasch wrote:

Well two users having this bug and two developers can not reproduce it, anyway I'm not using LQT annymore because it's really high-buggy and this is not the first time that such "Call to a member function ... on a non-object"-Errors occured

Hopefully I'll come across this in some reproducible way.

Haven't been able to reproduce in over a month, doubtless my recent overhauls have fixed the problem.

Closing as FIXED.

DaKiff wrote:

Reproduction successfull:

Error showing up in case of manually adding the lqt-table to the sql database (not by php maintenance/sql.php ...)

Solution:
http://www.mediawiki.org/wiki/Extension_talk:LiquidThreads#Error_on_Reply.3F (as seen above)

Importance:
Critical, all functions are working, but error message output

If someone can confirme please close.

DaKiff wrote:

Sorry, no solution, just a start point for improvements.

Didn't have a look on the solution. As described above it's just outcommenting lines with incalculable impacts on your database!

Actually I don't know how to classify the Bug right now, because IMHO it's a user failure in the database handling and not a bug.

(In reply to comment #8)

Are these errors still occurring? Is there something that can be done to
reliably reproduce the errors?

There is also a fatal error happening on ptwikibooks dumps page:
http://download.wikimedia.org/ptwikibooks/20101101/

Fatal error: Call to a member function getPrefixedText() on a non-object in /usr/local/apache/common-local/wmf-deployment/extensions/LiquidThreads/classes/Hooks.php on line 180

Is it related or should we open a new bug for that?

(In reply to comment #12)

Haven't been able to reproduce in over a month, doubtless my recent overhauls
have fixed the problem.

Closing as FIXED.

I just got the following on ptwikibooks when searching for "test"[1]:


PHP fatal error in /usr/local/apache/common-local/php-1.17/extensions/LiquidThreads/classes/Hooks.php line 232:

Call to a member function setFragment() on a non-object

[1] http://pt.wikibooks.org/w/index.php?title=Special:Search&redirs=0&search=test&fulltext=Search&ns0=1&ns1=1&ns2=1&ns3=1&ns4=1&ns5=1&ns6=1&ns7=1&ns8=1&ns9=1&ns10=1&ns11=1&ns12=1&ns13=1&ns14=1&ns15=1&ns90=1&ns91=1&ns92=1&ns93=1&uselang=en

(In reply to comment #18)

still reproducable

Here is another instance where the same error is happening:
https://secure.wikimedia.org/wikibooks/pt/wiki/Special:PrefixIndex/Thread:Helderg

samuel.lampa wrote:

I think this issue is too general ... since each different function which reports this error most certainly have their own explanations, right?

Just as an example, in my case, I got the error "Call to a member function isListed() on a non-object ..." on entering Special:SpecialPages (https://bugzilla.wikimedia.org/show_bug.cgi?id=30109), which turned out to be because of inconsistent naming of the SpecialPage "ARC2Admin" (named "SpecialARC2Admin" in some places), and fixed at r93441 ... but obviously that doesn't apply for the other errors in this issue.

samuel.lampa wrote:

Forget about my last comment (blush) (I didn't realize this was marked for a certain extension ... too tired, really ... )

Still there: PHP fatal error in /usr/local/apache/common-local/php-1.20wmf6/extensions/LiquidThreads/pages/ThreadPermalinkView.php line 224:
Call to a member function getPrefixedText() on a non-object

Encountered visiting https://www.mediawiki.org/w/index.php?title=Thread:Extension_talk:Nuke/White_Page/reply&action=edit&redlink=1 while the page was deleted.

1 PHP Fatal error:  Call to a member function getPrefixedText() on a non-object in /usr/local/apache/common-local/php-1.20wmf6/extensions/LiquidThreads/pages/Thre

adPermalinkView.php on line 224

1 PHP Fatal error:  Call to a member function getPrefixedText() on a non-object in /usr/local/apache/common-local/php-1.20wmf6/extensions/LiquidThreads/api/ApiFee

dLQTThreads.php on line 122

This is happening regularly on twn now:
PHP Fatal error: Call to a member function getPrefixedText() on a non-object in /www/w/extensions/LiquidThreads/pages/ThreadPermalinkView.php on line 224

Still low prio?

Still happening a few times per month on twn, line changed:

2013-08-25 20.05 -rakkaus:#mediawiki-i18n- [25-Aug-2013 18:05:28 UTC] PHP Fatal error: Call to a member function getPrefixedText() on a non-object in /www/translatewiki.net/w/extensions/LiquidThreads/pages/ThreadPermalinkView.php on line 214

  • Bug 54670 has been marked as a duplicate of this bug. ***

(In reply to comment #15)

There is also a fatal error happening on ptwikibooks dumps page:
http://download.wikimedia.org/ptwikibooks/20101101/

Fatal error: Call to a member function getPrefixedText() on a non-object in
/usr/local/apache/common-local/wmf-deployment/extensions/LiquidThreads/
classes/Hooks.php
on line 180

Is it related or should we open a new bug for that?

I reproduced this or a very similar one when importing the XML at bug 59739:

Fatal error: Call to a member function getPrefixedText() on a non-object in /www/dev.translatewiki.net/w/extensions/LiquidThreads/classes/Hooks.php on line 671

(In reply to comment #27)

(In reply to comment #15)

There is also a fatal error happening on ptwikibooks dumps page:
http://download.wikimedia.org/ptwikibooks/20101101/

Fatal error: Call to a member function getPrefixedText() on a non-object in
/usr/local/apache/common-local/wmf-deployment/extensions/LiquidThreads/
classes/Hooks.php
on line 180

Is it related or should we open a new bug for that?

I reproduced this or a very similar one when importing the XML at bug 59739:

Fatal error: Call to a member function getPrefixedText() on a non-object in
/www/dev.translatewiki.net/w/extensions/LiquidThreads/classes/Hooks.php on
line
671

I'd report it as a new one

One fixed today by Niklas https://gerrit.wikimedia.org/r/#/c/121957/
17.33 -rakkaus:#mediawiki-i18n- [29-Mar-2014 16:33:43 UTC] PHP Fatal error: Call to a member function getPrefixedText() on a non-object in

/www/translatewiki.net/w/includes/api/ApiFeedRecentChanges.php on line 85
Jdforrester-WMF lowered the priority of this task from Medium to Lowest.Aug 4 2016, 11:36 PM
Jdforrester-WMF added a subscriber: Jdforrester-WMF.

LiquidThreads has been replaced by StructuredDiscussions on all Wikimedia production wikis (except one, which will be done soon). It is no longer under active development or maintenance, so I'm re-classifying all open LQT tasks as "Lowest" priority.

Nemo_bis raised the priority of this task from Lowest to Medium.Aug 5 2016, 7:31 AM