Last modified: 2011-05-30 19:40:11 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T28698, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 26698 - LQT API throws fatal error if talkpage parameter missing
LQT API throws fatal error if talkpage parameter missing
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
LiquidThreads (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-01-12 22:14 UTC by Roan Kattouw
Modified: 2011-05-30 19:40 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Roan Kattouw 2011-01-12 22:14:43 UTC
Visit api.php?action=threadaction&method=talkpage_new_thread&threadaction=inlineeditform&token=%2B%5C&format=json (requires POST, I think, so to test this type $.post('/w/api.php?.....'); in the Firebug console) and you'll get ta fatal error. This request normally has a &talkpage= parameter, and when it's present everything works just fine.

These requests are sometimes generated when clicking the New section tab on a talk page (could only reproduce when logged out on prototype.wikimedia.org/d-en (runs REL1_17), not when logged in and not on trunk), and the JS involved seems to have no mechanism to either check it's sending correctly formed request or to handle errors.

Fatal error: Call to a member function getTitle() on a non-object in /home/catrope/mediawiki/trunk/extensions/LiquidThreads/classes/Thread.php on line 1550

Call Stack:
    0.0035     362648   1. {main}() /home/catrope/mediawiki/trunk/phase3/api.php:0
    0.2714   10875524   2. ApiMain->execute() /home/catrope/mediawiki/trunk/phase3/api.php:116
    0.2714   10875568   3. ApiMain->executeActionWithErrorHandling() /home/catrope/mediawiki/trunk/phase3/includes/api/ApiMain.php:328
    0.2715   10916956   4. ApiMain->executeAction() /home/catrope/mediawiki/trunk/phase3/includes/api/ApiMain.php:344
    0.2834   11547668   5. ApiThreadAction->execute() /home/catrope/mediawiki/trunk/phase3/includes/api/ApiMain.php:662
    0.2834   11550824   6. call_user_func_array() /home/catrope/mediawiki/trunk/extensions/LiquidThreads/api/ApiThreadAction.php:49
    0.2834   11550856   7. ApiThreadAction->actionInlineEditForm() /home/catrope/mediawiki/trunk/extensions/LiquidThreads/api/ApiThreadAction.php:0
    0.2905   12227016   8. LqtView::getInlineEditForm() /home/catrope/mediawiki/trunk/extensions/LiquidThreads/api/ApiThreadAction.php:785
    0.3016   12919532   9. LqtView->doInlineEditForm() /home/catrope/mediawiki/trunk/extensions/LiquidThreads/classes/View.php:378
    0.3138   13774728  10. LqtView->showNewThreadForm() /home/catrope/mediawiki/trunk/extensions/LiquidThreads/classes/View.php:342
    0.3139   13774872  11. Thread::canUserPost() /home/catrope/mediawiki/trunk/extensions/LiquidThreads/classes/View.php:388
Comment 1 Sam Reed (reedy) 2011-03-20 12:54:22 UTC
Wonder if this is still an issue

I see it has

		// Validate talkpage parameters
		if ( empty( $params['talkpage'] ) ) {
			$this->dieUsageMsg( array( 'missingparam', 'talkpage' ) );
		}

Which I swapped for !count() in r84377

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links