Last modified: 2014-05-12 19:28:47 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 T49150, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 47150 - sfEditFormPreloadText no longer works as it used to
sfEditFormPreloadText no longer works as it used to
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
SemanticForms (Other open bugs)
master
All All
: Unprioritized normal (vote)
: ---
Assigned To: s7eph4n
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-04-12 02:42 UTC by cariaso
Modified: 2014-05-12 19:28 UTC (History)
1 user (show)

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


Attachments

Description cariaso 2013-04-12 02:42:38 UTC
9c08a1871d1368a4f18077dd2d763a6a475cf869

https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/SemanticForms.git;a=commit;f=includes/SF_AutoeditAPI.php;h=9c08a1871d1368a4f18077dd2d763a6a475cf869

seems to have broken the way that I've been using sfEditFormPreloadText


I dynamically generate page content, so add as many 9s as you like, but please don't save. 

http://snpedia.com/index.php?title=Rs99999999999(G;T)&action=edit
correctly prepoulates a template based on the page title using the EditFormPreloadText hook. However equivalent function for sfEditFormPreloadText no longer works.

http://snpedia.com/index.php/Special:FormEdit/Genotype/rs999999999999999(T;T)


http://snpedia.com/index.php/Special:FormEdit/Genotype/rs999999999999999(T;T)
Comment 1 Yaron Koren 2013-04-12 02:49:11 UTC
Re-assigning to f.trott. f.trott - I looked into this, and it looks like there's something a little off about the "if" statements around this hook. Line 776 of /includes/SF_AutoeditAPI.php, which is currently:

                if ( !isset( $this->mOptions[ 'preload' ] ) || $this->mOptions[ 'preload' ] !== false ) {

...seems like it would make more sense as:

                if ( !isset( $this->mOptions[ 'preload' ] ) || $this->mOptions[ 'preload' ] === false ) {

However, that might not be the only issue.
Comment 2 Gerrit Notification Bot 2013-05-01 19:04:59 UTC
Related URL: https://gerrit.wikimedia.org/r/61815 (Gerrit Change I080bd4473635c26e8a8b853d5272f892ed00b639)
Comment 3 s7eph4n 2013-05-01 19:10:44 UTC
Mike, could you give the above patch a try and see if it fixes the issue?
Comment 4 cariaso 2013-05-01 20:35:56 UTC
I have tested. It does not resolve the issue. The function specified in sfEditFormPreloadText is not being called.
Comment 5 s7eph4n 2013-05-02 12:21:26 UTC
Darn, would have been too easy if that had worked. Thanks for testing.
Guess I'll have to work a bit more on this.
Comment 6 s7eph4n 2013-05-07 19:23:15 UTC
Ok, I think this is fixed now.

It was actually not a problem in the autoedit API, but in the Special:FormEdit page handler.
Comment 7 cariaso 2013-05-11 16:14:28 UTC
can you point me towards a url for info on the commit. I'd like to test this, but I don't know what to test.
Comment 8 s7eph4n 2013-05-11 16:24:02 UTC
The URL above is still valid: https://gerrit.wikimedia.org/r/61815
Comment 9 Gerrit Notification Bot 2013-05-14 08:11:56 UTC
https://gerrit.wikimedia.org/r/61815 (Gerrit Change I080bd4473635c26e8a8b853d5272f892ed00b639) | change APPROVED and MERGED [by Foxtrott]
Comment 10 Nathan Douglas 2014-05-12 19:21:36 UTC
Unexpected non-MediaWiki exception encountered, of type "Exception"
[b5d1c537] [no req] Exception from line 440 of /srv/www/core/extensions/SemanticForms/includes/SF_FormPrinter.php: Serialization of 'Closure' is not allowed
Backtrace:
#0 /srv/www/core/extensions/SemanticForms/includes/SF_FormPrinter.php(440): serialize(Parser)
#1 /srv/www/core/extensions/SemanticForms/includes/SF_AutoeditAPI.php(800): SFFormPrinter->formHTML(string, boolean, boolean, integer, string, string, NULL)
#2 /srv/www/core/extensions/SemanticForms/includes/SF_AutoeditAPI.php(116): SFAutoeditAPI->doAction()
#3 /srv/www/core/extensions/SemanticForms/specials/SF_FormEdit.php(89): SFAutoeditAPI->execute()
#4 /srv/www/core/extensions/SemanticForms/specials/SF_FormEdit.php(46): SFFormEdit::printForm(string, string, NULL, boolean)
#5 /srv/www/core/includes/SpecialPage.php(631): SFFormEdit->execute(string)
#6 /srv/www/core/includes/SpecialPageFactory.php(488): SpecialPage->run(string)
#7 /srv/www/core/includes/Wiki.php(298): SpecialPageFactory::executePath(Title, RequestContext)
#8 /srv/www/core/includes/Wiki.php(602): MediaWiki->performRequest()
#9 /srv/www/core/includes/Wiki.php(467): MediaWiki->main()
#10 /srv/www/core/index.php(49): MediaWiki->run()
#11 {main}

I'm getting this exception when I try to create-with-form a new document via a redlink.  The sfEditFormPreloadText extension I'm using ( see #56569 ) is registered but the body of the hook function just returns true.  HEAD doesn't trigger the exception.
Comment 11 Nathan Douglas 2014-05-12 19:23:15 UTC
My bad, ignore me -- I missed the year on these posts :-/
Comment 12 s7eph4n 2014-05-12 19:28:47 UTC
Ignoring is easy.  :D

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


Navigation
Links