Page MenuHomePhabricator

Page Forms undefined error when using #formlink
Open, Needs TriagePublic

Description

After clicking the save button when using the #formlink parser function, there is always a white box with the word undefined that flashes on the screen for about 1-2 seconds

Screen Shot 2020-02-25 at 10.12.13 PM.jpg (612×762 px, 27 KB)
. Is there a way to suppress this message?

Related Objects

Event Timeline

Do you mean, when saving a page that happens to contain a call to #formlink?

Yes, that is correct when saving a page using #formlink

Do you mean, when saving a page that happens to contain a call to #formlink?

Do you mean, when saving a page that happens to contain a call to #formlink?

@Madrigal84: I see that you assigned this task. Did you talk to Yaron before, and did Yaron agree to work on this task? (Also, exact version information is always welcome in bug reports.) Thanks!

Sorry about that; I didn't mean to assign the task.

MediaWiki 1.31.1
PHP 7.2.11 (apache2handler)
Page Forms 4.6 (71f42d6) 10:08, September 4, 2019

I tried to recreate the error by using #formlink parser function as mentioned in https://www.mediawiki.org/wiki/Extension:Page_Forms/Linking_to_forms#Using_#formlink, but I couldn't experience that error. I am using the same query as in the first example of the given link.
@Madrigal84 @Yaron_Koren Could you please help me if I might be missing some parameters?

I, too, am curious about this - I don't think I tried reproducing this problem.

@Yaron_Koren I have written a statement as : -
{{#formlink:form=Gadgets|link text=Edit gadget|link type=button|query string=Gadgets[model]={{PAGENAME}} }}
Template: Gadgets
Form:Gadgets
Structure is something like

image.png (119×246 px, 6 KB)

When I click the Edit gadget button it takes me to the following page:-
image.png (136×268 px, 7 KB)

Can you please help me with what am I doing wrong?

@Sahajsk - you need to specify "target=" also.

I know it works with "target" but on the wiki it says
target= - shouldn't usually be used, but it sets the "target" page to be edited if you want to link to the editing of a specific page.
That is why I asked if I was doing something wrong

Right. Yes, that's true. #formlink is usually used for forms that have a "page name formula", and don't require a page name ahead of time. So it might help if you tried it that way. See https://www.mediawiki.org/wiki/Extension:Page_Forms/Linking_to_forms#The_one-step_process

Thanks @Yaron_Koren
I have tried a few variants with #formlink and tried what was mentioned in the task description, but couldn't experience this.
@Madrigal84 I suggest you, please try this once again as this issue might be fixed.

@Yaron_Koren I upgraded to Page Forms 4.9.5 and following a save action with a #formlink that uses popup + reload, the undefined message is still appears for a split second right before the page refreshes.

Click button to access form --> #formlink (|popup|reload) --> Save --> undefined --> page refresh successful

Untitled.png (663×712 px, 23 KB)

hey @Yaron_Koren sir! I am Amit Patel currently in first year of my computer science course, i see your project idea for Gsoc 2021 "Add autocompletion to Page Forms spreadsheet display" and I am kinda interested in it, but after going through the deadlines, i concluded that i cant make it for this year as I don't know about such programs before. I go through the proposals for this year and in every proposal a notice was stated by shristi sethi mam "The contribution made on evaluation period will be only considered for evaluation. Contribution done after evaluation period will not be counted for evaluation" so if i contribute from now are they are going to be counted for gsoc 22? or i have to wait for next evaluation period?? sorry if i am wrong somewhere as i am freshman in this...

Hi @Amitpatel99! Yes, unfortunately it's too late to apply for GSoC 2021. But yes, you could fix this bug already and then point to the fix when applying for GSoC 2022. Students have applied for GSoC and pointed out all sorts of fixes and improvements they have made, in the MediaWiki code - not just microtasks that were defined specifically for that GSoC task.

Aklapper added a subscriber: Yaron_Koren.

Removing task assignee due to inactivity as this open task has been assigned for more than two years. See the email sent to the task assignee on August 22nd, 2022.
Please assign this task to yourself again if you still realistically [plan to] work on this task - it would be welcome!
If this task has been resolved in the meantime, or should not be worked on ("declined"), please update its task status via "Add Action… 🡒 Change Status".
Also see https://www.mediawiki.org/wiki/Bug_management/Assignee_cleanup for tips how to best manage your individual work in Phabricator. Thanks!