Page MenuHomePhabricator

Can not create new page from form
Closed, InvalidPublicBUG REPORT

Description

My Version information:
MediaWiki 1.35.1
PHP 7.3.27-1~deb10u1 (apache2handler)
MariaDB 10.3.27-MariaDB-0+deb10u1
ICU 63.1
Page Forms 5.1 (ff424c0) 19:21, 26 February 2021
Cargo 2.7.1 (34bc7ae) 19:38, 26 February 2021
ParserFunctions 1.6.0 (59a9135) 18:43, 10 July 2020
Vector – (e3d48bc) 05:51, 8 January 2021
Echo – (fd6a33e) 10:00, 1 January 2021
Flex Diagrams 0.2 (d65d73c) 23:04, 22 February 2021
VisualEditor 0.1.2 (be34a2d) 12:36, 31 December 2020
HideSidebar 1.0.1
LDAPAuthentication2 1.0.2 (58e281c) 16:04, 7 January 2021

Steps to Reproduce:

  1. Create a simple form with Special:CreateForm or by editing source. I.e this one:
<noinclude>
This is the "Test3" form.
To create a page with this form, enter the page name below;
if a page with that name already exists, you will be sent to a form to edit that page.

{{#forminput:form=Test3}}

</noinclude><includeonly>
<div id="wikiPreview" style="display: none; padding-bottom: 25px; margin-bottom: 25px; border-bottom: 1px solid #AAAAAA;"></div>
==section1==
{{{section|section1|level=2}}}

'''Free text:'''

{{{standard input|free text|rows=10}}}


{{{standard input|summary}}}

{{{standard input|minor edit}}} {{{standard input|watch}}}

{{{standard input|save}}} {{{standard input|preview}}} {{{standard input|changes}}} {{{standard input|cancel}}}
</includeonly>
  1. try to create a page with this form. Go to Form:Test3 and give a name i. e. test31, then click "Create and Edit" button

Actual Results:

a site with URL /index.php/Special:FormStart?form=Test3&page_name=test31 opens and only a animated loading.gif appears on the blank white page. No errors at all.
The source of the opened site:

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

Expected Results:

a new page from page form should be created.

Notes:
the issue is similar to second one in https://phabricator.wikimedia.org/T267724
also discussed here: https://www.mediawiki.org/wiki/Extension_talk:Page_Forms#HowTo_Debug_%22Create_or_Edit%22_Process_from_PageForms

Event Timeline

Aklapper added a subscriber: Yaron_Koren.

Hi @Vitalisator, thanks for taking the time to report this and welcome to Wikimedia Phabricator!
Resetting assignee; assuming this is about MediaWiki-extensions-Page_Forms.

Let me ask the same question I asked in that other bug report - do you see a JavaScript error in the browser console?

if you men that one on the bottom of the page
$wgDebugToolbar = true;

not at all, the whole debug Toolbar disappears after clicking "Create and Edit" button
only blank page with loading.gif

bevore clicking "Create and Edit", I see this in the debug console:
Deprecated Use of InternalParseBeforeSanitize hook (used in VariablesHooks::onInternalParseBeforeSanitize) was deprecated in MediaWiki 1.35. [Called from MediaWiki\HookContainer\HookContainer::run in /var/www/html/mediawiki/includes/HookContainer/HookContainer.php at line 131]
Backtrace:
GlobalFunctions.php line 1029 calls MWDebug::deprecated()
HookContainer.php line 316 calls wfDeprecated()
HookContainer.php line 131 calls MediaWiki\HookContainer\HookContainer->callLegacyHook()
HookRunner.php line 2219 calls MediaWiki\HookContainer\HookContainer->run()
Parser.php line 1559 calls MediaWiki\HookContainer\HookRunner->onInternalParseBeforeSanitize()
Parser.php line 651 calls Parser->internalParse()
MessageCache.php line 1301 calls Parser->parse()
Message.php line 1258 calls MessageCache->parse()
Message.php line 889 calls Message->parseText()
Message.php line 942 calls Message->toString()
Skin.php line 713 calls Message->parse()
SkinTemplate.php line 371 calls Skin->printSource()
SkinTemplate.php line 127 calls SkinTemplate->prepareQuickTemplate()
SkinTemplate.php line 144 calls SkinTemplate->generateHTML()
OutputPage.php line 2615 calls SkinTemplate->outputPage()
MediaWiki.php line 947 calls OutputPage->output()
MediaWiki.php line 960 calls MediaWiki->{closure}()
MediaWiki.php line 543 calls MediaWiki->main()
index.php line 53 calls MediaWiki->run()
index.php line 46 calls wfIndexMain()
MediaWiki\HookContainer\HookContainer::run
Deprecated Use of SkinTemplateOutputPageBeforeExec hook (used in HitCounters\Hooks::onSkinTemplateOutputPageBeforeExec) was deprecated in MediaWiki 1.35. [Called from MediaWiki\HookContainer\HookContainer::run in /var/www/html/mediawiki/includes/HookContainer/HookContainer.php at line 131]
Backtrace:
GlobalFunctions.php line 1029 calls MWDebug::deprecated()
HookContainer.php line 316 calls wfDeprecated()
HookContainer.php line 131 calls MediaWiki\HookContainer\HookContainer->callLegacyHook()
HookRunner.php line 3603 calls MediaWiki\HookContainer\HookContainer->run()
SkinTemplate.php line 399 calls MediaWiki\HookContainer\HookRunner->onSkinTemplateOutputPageBeforeExec()
SkinTemplate.php line 127 calls SkinTemplate->prepareQuickTemplate()
SkinTemplate.php line 144 calls SkinTemplate->generateHTML()
OutputPage.php line 2615 calls SkinTemplate->outputPage()
MediaWiki.php line 947 calls OutputPage->output()
MediaWiki.php line 960 calls MediaWiki->{closure}()
MediaWiki.php line 543 calls MediaWiki->main()
index.php line 53 calls MediaWiki->run()
index.php line 46 calls wfIndexMain()
MediaWiki\HookContainer\HookContainer::run
Log MWDebug output complete

No, I don't mean the MediaWiki debug toolbar, I mean the console that's part of the browser. (Well, it depends on which browser you use.) You can usually get to it by right-clicking on the screen and hitting "Inspect".

ah, ok.
there is nothing relevant, only a message that favicon is not set

[Exception... "Favicon at "https://wiki.goetel.de/favicon.ico" failed to load: Not Found." nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: resource:///modules/FaviconLoader.jsm :: onStopRequest :: line 253" data: no] FaviconLoader.jsm:253:22

onStopRequest resource:///modules/FaviconLoader.jsm:253

If it helps, I can PM you a test account to our production wiki

Oh, okay. Yes, that would help a lot, actually.

just sent you a mail to yaron57@gmail.com
Thanks a lot!

Hi,

here a "quick and dirty" workaround that is working for me.
-$text .= "\n" . Html::element( 'meta', [ 'http-equiv' => 'refresh', 'content' => "0; url=$redirect_url" ] );
+$text .= "\n" . Html::element( 'meta', [ 'http-equiv' => 'refresh', 'content' => "0; url=$redirect_url" ] ) . '>';

The question is, why the <meta> tag is truncated.
Maybe a issue with the Html::element()? Is it a part of mediawiki Framework?
Or something outside of scope of the PageForms. I.e. Site post processing or caching?

best regards

Vitali

Sure, that would work. Maybe it's good enough.

I have no idea why that is happening for you! I haven't heard of it happening for anyone else.

@Vitalisator - does this problem still happen for you, do you know? Is that workaround still needed?

Hello Yaron,

since I had applied the workaround, it has been working well. In the
meantime I had delegated the response for our wiki to IT staff, so in doubt
you can just close this ticket.

Vitali

Alright, I'm closing this on the assumption that this was just a strange, one-time occurrence... hopefully it won't happen for anyone else!