Last modified: 2011-10-03 09:33:07 UTC
Hi. I've got a problem with query string in formlinks with text fields. I have the following: {{#formlink:form=Outlet Form|link text=Add/Edit Outlet|link type=button|query string=Outlet Template[Website]={{{Website|}}}&Outlet Template[Address]={{{Address|}}}}} The Address is a text property. If I have the following in the address: 20 Marsh Road Cowes The formlink button doesn't work. In Firebug's console I see the following error: unterminated string literal error source line: window.location.href='/iow/index.php/S...20Template[Address]=31%20Marsh%20Road If I just have the first line of the address: 20 Marsh Road Then the formlink works. So it looks like it now can't handle the carriage return or linefeed character. This used to work with SF 1.9 and I now can't upgrade existing sites because of this bug unfortunately. I'm running SF 2.2.1, MW 1.16.5 and MW 1.5.6.
Broken #formlink, generates </p><table class= In testing 1.18alpha and SF 2.2.1 trunk r96149, #formlink breaks the link. The call [1] worked in earlier version, now generates a broken link containing [2] [1] {{#formlink:form=Glossary|link text=GL|popup|link type=link|query string=form=Glossary&target=GL:{{UUID}} }} [2] "Special:FormEdit/Glossary?form=Glossary&target=GL: </p><table%20class=" wikitable"="">UUID" class="popupformlink">GL
Neill - I believe I just fixed this now, in SVN; thanks for the bug report. MWJames - I think in your #formlink call, you need to change "&target=" to "|target=" - 'target' is a separate parameter. That might not solve the problem, though - it looks like your "{{UUID}}" value holds more than just a string. Maybe it should be "{{{UUID}}}" instead? In any case, I'm marking this as "fixed". Feel free to re-open.
Good stuff Yaron. I will test the fix :) Many thanks Neill.