Last modified: 2012-02-22 12:41:33 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 T35771, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 33771 - formlink query string broke line with apostrophe in {{PAGENAME}}
formlink query string broke line with apostrophe in {{PAGENAME}}
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
SemanticForms (Other open bugs)
unspecified
All Linux
: Unprioritized major with 1 vote (vote)
: ---
Assigned To: Yaron Koren
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-01-17 19:07 UTC by dvdgmz
Modified: 2012-02-22 12:41 UTC (History)
3 users (show)

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


Attachments

Description dvdgmz 2012-01-17 19:07:38 UTC
If we have a button like this:

{{#formlink:form=Activitat|New activity|link
type=button|query string=Activitat[Obra]={{PAGENAME}} }}

When the title of the page have an apostrophe or single quote, like in this case:

   Stuka's shadow by Hernández

the text appears broken just behind the apostrophe in the form field
'Obra'.

{{PAGENAMEE}} it's not an option because it put underscores instead of spaces.

It seems to work well in old versions of SF but not in 2.3 version.
Comment 1 Neill Mitchell 2012-01-17 20:24:29 UTC
This is a regression since version 2.1. It used to work fine.

Apostrophes are a very common character to use in page names, so it would be great if this could be fixed.

Thanks
Neill.
Comment 2 Yaron Koren 2012-01-17 20:36:59 UTC
Changed "value" to "{{PAGENAME}}" in bug title, for clarity.
Comment 3 Yaron Koren 2012-01-17 21:16:39 UTC
I think this is fixed now in SVN.
Comment 4 dvdgmz 2012-01-17 22:08:25 UTC
Yes it works well with the version in SVN.
But now it stops HeaderTabs. Only when there is an apostrophe.
Comment 5 Yaron Koren 2012-01-17 22:11:04 UTC
Sorry, what do you mean by that? And can you link to an example?
Comment 6 dvdgmz 2012-01-17 22:46:40 UTC
The firts time I tested didn't load the HeaderTabs in the form.
But now I can't reproduce that.

It seems that works well :)
Comment 7 Yaron Koren 2012-01-17 22:56:10 UTC
Awesome! My favorite kind of bug report. :)

I'm setting this to "fixed"; if you find a problem, though, feel free to re-open it.
Comment 8 dvdgmz 2012-01-17 23:14:11 UTC
Ok, fixed then!
:)
Comment 9 Neill Mitchell 2012-01-18 10:51:27 UTC
I've just tried this and when I click the formlink button it throws the following error:
Fatal error: Call to undefined method Html::closeelement() in /home/webapps/wiki/extensions/SemanticForms/includes/forminputs/SF_RadioButtonInput.php on line 97

This is with revision 109354.

Cheers
Neill.
Comment 10 Pascal Beaujeant 2012-01-18 11:45:18 UTC
I suspect this bug is related to the international characters management in some (or all) semantic tools.
Indeed, at the beginning, I'm working with MW version 1.16 and I have the problem to manage accentuated characters (as in French). At the beginning, I'm running MW 1.16 and Yaron give me the solution :
----
28 Jun 2011 à 23:52, Yaron Koren a écrit :

Hi,

Ah, your wiki is public - you should have mentioned that before; that definitely makes debugging easier. I think I found the problem - there's a bug in Special:CreateTemplate (and Special:CreateForm), that prevents it from working in wikis that are in certain non-English languages. I think this can best be fixed by removing line 198 from /specials/SF_CreateTemplate.php - the line that looks like:

              $text .= "\t" . Html::hidden( 'title', SFUtils::titleURLString( $ct ) ) . "\n";

If you just delete that line, it should work...

In /specials/SF_CreateForm.php, there's a similar line that should be removed: line 224.
----




When I'm upgrade to 1.17, the problems seems to be again there. And I try the patch given by Yaron without success at this time. (I presume I need to upgrade to 1.18???) :
----
04 Jan 2012 à 23:16, Yaron Koren a écrit :

It looks like those lines are still there in SF_CreateTemplate.php and SF_CreateForm.php; they just got rewritten at all. They now look like:

$text .= SFFormUtils::hiddenFieldHTML( 'title', $this->getTitle()->getPrefixedText() );

It's line 188 in SF_CreateTemplate.php and line 221 in SF_CreateForm.php.

You can just comment those out again. The reason I didn't remove those is that sometimes they're necessary - if the wiki doesn't have a good URL structure. Ideally, there could be code that works for all cases, but I guess I haven't looked into the issue enough.

-Yaron
----



I have some bugs related to this bugzillia.
Indeed, with SemanticGraph extension and the timeline graph generated doesn't give the correct link but instead a link to a page limited at the first apostrophe. 

I get the same with HeaderTabs but also the HeaderTabs doesn't run where the jump to the part of the form with a First level accentuated title doesn't run.

I suspect a basement problem with non english caracters.
Friday, I upgrade mediawiki to 1.18 and Semantic Bundle associated.
Comment 11 Yaron Koren 2012-01-18 13:49:04 UTC
These are all unrelated problems - I'm marking this bug as fixed again.
Comment 12 Neill Mitchell 2012-01-18 14:17:38 UTC
Yup, just checked new revision 109364 and it works :)
Comment 13 Yaron Koren 2012-01-18 14:20:32 UTC
That's nice, but - again, separate issue.
Comment 14 dvdgmz 2012-01-18 16:41:42 UTC
After of adding this SF version my wiki seems to have a strange behaviour in some aspects, maybe related with JavaScript and/or css.

Here, for example:
http://lletra.uoc.edu/viquilletra/index.php?title=Usuari:BadCompany&action=formedit

"show on select=" don't work (the divs are shown).

And here:
http://lletra.uoc.edu/viquilletra/index.php?title=Anunci_de_La_pell_freda,_per_Nike&action=formedit

The HeaderTabs don't load. And the autocomplete don't works.

But here (strange) works:
http://lletra.uoc.edu/viquilletra/index.php?title=Ant%C3%ADgona_de_Salvador_Espriu&action=formedit

The problem is with some forms but not with others.
And all these forms worked well (except the problem with apostrophe) in previous version.

:/
Comment 15 dvdgmz 2012-01-18 16:48:43 UTC
All the forms with this problem has the wikieditor param in some field.
It should to be a separate bug?
Comment 16 Yaron Koren 2012-01-18 16:49:36 UTC
Yes, it should have been a separate bug. :) In any case, I just fixed it now in SVN, I think.

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


Navigation
Links