Page MenuHomePhabricator

Can not create new page with "Spezial:Mit_Formular_hinzufügen" ... (add with form?)
Open, Needs TriagePublic

Description

after update to MW 1.35.0, SMW 3.2.0 and Ext:PageForm 4.9.5 I have the following issues:

  • maintanance/update.php causes an error importing the \SemanticMediaWiki\Data\import\swm.groups.json:

Importing from smw.groups.json ...

... SMW/Schema:Group:Schema properties ...[35d99ac3c27f670d3af269d6] [no req]   TypeError from line 1007 of C:\QMSserv\htdocs\includes\parser\Parser.php: Return value of Parser::getTitle() must be an instance of Title, null returned

Skipping this with an empty array, update works fine but leads to 2 other mistakes.

  • creating a new Page by form ends in an empty html-page with just a loading-gif
  • uploading a file works manualy but not with pageforms endig with this error: [646f20a8adb3d93d54b8ac98] /index.php/Spezial:Hochladefenster Error from line 491 of C:\QMSserv\htdocs\extensions\PageForms\specials\PF_UploadWindow.php: Using $this when not in object context Backtrace: #0 C:\QMSserv\htdocs\extensions\PageForms\specials\PF_UploadWindow.php(385): PFUploadWindow::getInitialPageText(string, string,

string, string)

#1 C:\QMSserv\htdocs\extensions\PageForms\specials\PF_UploadWindow.php(154): PFUploadWindow->processUpload()
#2 C:\QMSserv\htdocs\includes\specialpage\SpecialPage.php(600): PFUploadWindow->execute(NULL)
#3 C:\QMSserv\htdocs\includes\specialpage\SpecialPageFactory.php(635): SpecialPage->run(NULL)
#4 C:\QMSserv\htdocs\includes\MediaWiki.php(307): MediaWiki\SpecialPage\SpecialPageFactory->executePath(Title, RequestContext)
#5 C:\QMSserv\htdocs\includes\MediaWiki.php(940): MediaWiki->performRequest()
#6 C:\QMSserv\htdocs\includes\MediaWiki.php(543): MediaWiki->main()
#7 C:\QMSserv\htdocs\index.php(53): MediaWiki->run()
#8 C:\QMSserv\htdocs\index.php(46): wfIndexMain()
#9 {main}

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 11 2020, 11:55 AM
Letofred updated the task description. (Show Details)Nov 11 2020, 12:43 PM
Letofred updated the task description. (Show Details)Nov 11 2020, 12:45 PM
Letofred updated the task description. (Show Details)

Well, this looks like three different errors. The first one looks like an SMW error, while the third one was fixed a few weeks ago (after the release of version 4.9.5, unfortunately). The second one looks like a JavaScript error. Could you open the JS console in your browser, go back to the form that doesn't work, and see if there are any error messages there?

  1. The handling of Parser::getTitle() changed in MW 1.35. - so that may be fixed with next SMW-version. Looks like, I can work with a empty json-import-file for a while.
  2. My workaround to create a new page, copy an old context into this and edit this with PageForm works for me tolerable - but for my users it's hard to do so. I creat a snapshot of my wiki (url/user/pass by mail when done) so you can take a look at it. I can't find any JS error.
  3. Using the latest GitHub version seems to upload a file correctly, but ends up with an empty white upload-window, without any error, but even without returning to the PageForm. Actual GitHub-version leads to so many other errors (empty forms), so I actualy step back to 4.9.5

Hi,

For the blank pages, please see this:

https://www.mediawiki.org/wiki/Manual:Common_errors_and_symptoms#You_see_a_Blank_Page

It would be great to know what the actual error is.

1.) Latest SMW 3.2.1 with same update problem. Looking later for this ...
2.) Add_with_form seems to break with:

VM961:1 Uncaught TypeError: Cannot read property 'closest' of null
  at <anonymous>:1:829
  at domEval (load.php?lang=de&modules=startup&only=scripts&raw=1&skin=vector:11)
  at runScript (load.php?lang=de&modules=startup&only=scripts&raw=1&skin=vector:13)
  at execute (load.php?lang=de&modules=startup&only=scripts&raw=1&skin=vector:14)
  at doPropagation (load.php?lang=de&modules=startup&only=scripts&raw=1&skin=vector:7)

Going to edit ends with this html:

<html>
<head></head>
<body>
<p style="position: absolute; left: 45%; top: 45%;">
 <img src="/extensions/PageForms/skins/loading.gif">
</p>	
</body> 
</html>

actualy I have problems to make a snapshot to give you access. Any ideas to fix this?
3.) Upload-Window ending with:

[0df8b4a437400c0d4907040c] /index.php/Spezial:Hochladefenster Error from line 493 of C:\QMSserv\htdocs\extensions\PageForms\specials\PF_UploadWindow.php: Using $this when not in object context
Backtrace:
#0 C:\QMSserv\htdocs\extensions\PageForms\specials\PF_UploadWindow.php(385): PFUploadWindow::getInitialPageText(string, string, string, string)
#1 C:\QMSserv\htdocs\extensions\PageForms\specials\PF_UploadWindow.php(154): PFUploadWindow->processUpload()
#2 C:\QMSserv\htdocs\includes\specialpage\SpecialPage.php(600): PFUploadWindow->execute(NULL)
#3 C:\QMSserv\htdocs\includes\specialpage\SpecialPageFactory.php(635): SpecialPage->run(NULL)
#4 C:\QMSserv\htdocs\includes\MediaWiki.php(307): MediaWiki\SpecialPage\SpecialPageFactory->executePath(Title, RequestContext)
#5 C:\QMSserv\htdocs\includes\MediaWiki.php(940): MediaWiki->performRequest()
#6 C:\QMSserv\htdocs\includes\MediaWiki.php(543): MediaWiki->main()
#7 C:\QMSserv\htdocs\index.php(53): MediaWiki->run()
#8 C:\QMSserv\htdocs\index.php(46): wfIndexMain()
#9 {main}

Any help?

  1. using: index.php?title=FooBar&action=formedit let me choose the form and works ... but is a long work-around ...

@Letofred - for #2, could you add "?debug=true" to the URL? That will hopefully provide a more useful error message.

For #3 - that's a bug that was fixed a while ago - please get the latest Page Forms code.

Letofred added a comment.EditedNov 24 2020, 12:38 PM
  1. with "index.php/Formular:Prozess?debug=true" I got:

    Uncaught TypeError: Cannot read property 'closest' of null at load.php?debug=true&lang=de&modules=site&only=scripts&skin=vector&version=pv5bl:47 a(anonymous) @ load.php?debug=true&lang=de&modules=site&only=scripts&skin=vector&version=pv5bl:47

leading to the same html-code listed above.
These error can also be found on any other page - including mainpage - so this seems not to have any to do with it ...

Sorry, I should have been clearer - please add "?debug=true" to the URL of the actual form, where the error happens, not the form definition page beforehand.

There is no Error on
http://[...]/index.php/Spezial:Mit_Formular_hinzufügen?debug=true&page_name=Blabla&form=Prozess
just the short html-code without any JS:

<html>
  <head></head>
  <body>
    <p style="position: absolute; left: 45%; top: 45%;"><img src="/extensions/PageForms/skins/loading.gif">
    </p>	
  </body>
</html>
Yaron_Koren added a comment.EditedNov 25 2020, 5:35 PM

Oh, that's very interesting. The JS problem seems unrelated to the blank form problem, which I think means that this bug report covers four separate bugs. :)

I'm guessing that there is some syntax error in the form definition. Could you paste it here, if it's not meant to be private?

I don't think that will help, because non of my forms work - but I finaly get my snapschot working.
Please send me a mail to yk@astr0.de and I will send you the URL, user and pass ... so you may take a deeper look at it.
Thank you in advance!

Letofred added a comment.EditedNov 26 2020, 8:18 AM

Well ...
after testing the snapshot online ... Problem 2 disappeared - leading me to a server problem. After resetting the user-rights of all directories it doesn't appear on my server ...
I don't understand, why file-access may lead to this problem - but its non of my business :-D

Trying to fix problem 1 by installing Extension:Page Schemas. I hoped it will setup schemas for the import by SMW - even its no requirement. But did'nt work

For Problem 3 I tested the actual GitHub-version of PageForm and it fixed the upload-problem, but seems to have problems with the "textarea with autocomplete" which are shown as empty drop-down-boxes ... but I can wait for the next public release, because manual upload works fine.