Error starting new form when there is a space at the end of the name.

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Error starting new form when there is a space at the end of the name.

Joseph Padfield
Hi,

I have spotted a bug when trying to create new pages with forms. I noticed the error with:

MediaWiki     1.28.2
Semantic MediaWiki     2.5.2

But you can also see the error starting: https://sandbox.semantic-mediawiki.org/wiki/Formulaire:Book

Type in a new title and end the string with a space, then click "Create or edit"

I tried with the title " Test " and got the following error:

[203bf4dc5c0817f59e5a72d3] /wiki/Sp%C3%A9cial:AjouterPage?page_name=Test+&form=Book Wikimedia\Assert\ParameterAssertionException from line 63 of /var/www/htdocs/mw/02100/w/vendor/wikimedia/assert/src/Assert.php: Bad value for parameter $dbkey: invalid DB key 'AjouterDonnées/Book/Test_'

Backtrace:

#0 /var/www/htdocs/mw/02100/w/includes/title/TitleValue.php(82): Wikimedia\Assert\Assert::parameter(boolean, string, string)
#1 /var/www/htdocs/mw/02100/w/includes/specialpage/SpecialPage.php(100): TitleValue->__construct(integer, string, string)
#2 /var/www/htdocs/mw/02100/w/includes/specialpage/SpecialPage.php(84): SpecialPage::getTitleValueFor(string, string, string)
#3 /var/www/htdocs/mw/02100/w/includes/specialpage/SpecialPage.php(629): SpecialPage::getTitleFor(string, string)
#4 /var/www/htdocs/mw/02100/w/includes/specialpage/SpecialPage.php(618): SpecialPage->getPageTitle(string)
#5 /var/www/htdocs/mw/02100/w/extensions/PageForms/specials/PF_FormStart.php(126): SpecialPage->getTitle(string)
#6 /var/www/htdocs/mw/02100/w/extensions/PageForms/specials/PF_FormStart.php(157): PFFormStart::getFormEditURL(string, string)
#7 /var/www/htdocs/mw/02100/w/extensions/PageForms/specials/PF_FormStart.php(80): PFFormStart->doRedirect(string, string, NULL)
#8 /var/www/htdocs/mw/02100/w/includes/specialpage/SpecialPage.php(522): PFFormStart->execute(NULL)
#9 /var/www/htdocs/mw/02100/w/includes/specialpage/SpecialPageFactory.php(578): SpecialPage->run(NULL)
#10 /var/www/htdocs/mw/02100/w/includes/MediaWiki.php(287): SpecialPageFactory::executePath(Title, RequestContext)
#11 /var/www/htdocs/mw/02100/w/includes/MediaWiki.php(862): MediaWiki->performRequest()
#12 /var/www/htdocs/mw/02100/w/includes/MediaWiki.php(523): MediaWiki->main()
#13 /var/www/htdocs/mw/02100/w/index.php(43): MediaWiki->run()
#14 {main}

Thanks

Joe

--
Joseph Padfield
Conservation Scientist
Scientific Department
The National Gallery
Trafalgar Square
London WC2N 5DN
+44 (0)20 7747 2553
http://research.ng-london.org.uk
http://www.twitter.com/JoePadfield
[The National Gallery, Trafalgar Square, London WC2N 5DN]<http://www.nationalgallery.org.uk>
[Chris Ofili: Weaving Magic exhibition]<http://www.nationalgallery.org.uk/whats-on/exhibitions/chris-ofili-weaving-magic>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Error starting new form when there is a space at the end of the name.

Yaron Koren-2
Hi Joe,

All the form functionality comes from an extension called Page Forms. I'd
ask you what version you're running, but it's probably not that relevant,
because that Sandbox wiki is running the latest version of PF, and they
have the same problem that you do.

I have wikis that are also running the latest version of PF, and none of
them have this particular bug, so I don't know what's causing it. Perhaps
it has to do with the MediaWiki version, or the version of PHP, or with
some Apache configuration. (I tried setting one of my wikis to use French,
and I still couldn't get that error, so I don't think it's that.)

Out of curiosity, is the backtrace you see for the error on your wiki more
or less the same as the one on the Sandbox wiki?

-Yaron

On Tue, Jun 27, 2017 at 1:22 PM, Joseph Padfield <
[hidden email]> wrote:

> Hi,
>
> I have spotted a bug when trying to create new pages with forms. I noticed
> the error with:
>
> MediaWiki     1.28.2
> Semantic MediaWiki     2.5.2
>
> But you can also see the error starting: https://sandbox.semantic-media
> wiki.org/wiki/Formulaire:Book
>
> Type in a new title and end the string with a space, then click "Create or
> edit"
>
> I tried with the title " Test " and got the following error:
>
> [203bf4dc5c0817f59e5a72d3] /wiki/Sp%C3%A9cial:AjouterPage?page_name=Test+&form=Book
> Wikimedia\Assert\ParameterAssertionException from line 63 of
> /var/www/htdocs/mw/02100/w/vendor/wikimedia/assert/src/Assert.php: Bad
> value for parameter $dbkey: invalid DB key 'AjouterDonnées/Book/Test_'
>
> Backtrace:
>
> #0 /var/www/htdocs/mw/02100/w/includes/title/TitleValue.php(82):
> Wikimedia\Assert\Assert::parameter(boolean, string, string)
> #1 /var/www/htdocs/mw/02100/w/includes/specialpage/SpecialPage.php(100):
> TitleValue->__construct(integer, string, string)
> #2 /var/www/htdocs/mw/02100/w/includes/specialpage/SpecialPage.php(84):
> SpecialPage::getTitleValueFor(string, string, string)
> #3 /var/www/htdocs/mw/02100/w/includes/specialpage/SpecialPage.php(629):
> SpecialPage::getTitleFor(string, string)
> #4 /var/www/htdocs/mw/02100/w/includes/specialpage/SpecialPage.php(618):
> SpecialPage->getPageTitle(string)
> #5 /var/www/htdocs/mw/02100/w/extensions/PageForms/specials/PF_FormStart.php(126):
> SpecialPage->getTitle(string)
> #6 /var/www/htdocs/mw/02100/w/extensions/PageForms/specials/PF_FormStart.php(157):
> PFFormStart::getFormEditURL(string, string)
> #7 /var/www/htdocs/mw/02100/w/extensions/PageForms/specials/PF_FormStart.php(80):
> PFFormStart->doRedirect(string, string, NULL)
> #8 /var/www/htdocs/mw/02100/w/includes/specialpage/SpecialPage.php(522):
> PFFormStart->execute(NULL)
> #9 /var/www/htdocs/mw/02100/w/includes/specialpage/SpecialPageFactory.php(578):
> SpecialPage->run(NULL)
> #10 /var/www/htdocs/mw/02100/w/includes/MediaWiki.php(287):
> SpecialPageFactory::executePath(Title, RequestContext)
> #11 /var/www/htdocs/mw/02100/w/includes/MediaWiki.php(862):
> MediaWiki->performRequest()
> #12 /var/www/htdocs/mw/02100/w/includes/MediaWiki.php(523):
> MediaWiki->main()
> #13 /var/www/htdocs/mw/02100/w/index.php(43): MediaWiki->run()
> #14 {main}
>
> Thanks
>
> Joe
>
> --
> Joseph Padfield
> Conservation Scientist
> Scientific Department
> The National Gallery
> Trafalgar Square
> London WC2N 5DN
> +44 (0)20 7747 2553
> http://research.ng-london.org.uk
> http://www.twitter.com/JoePadfield
> [The National Gallery, Trafalgar Square, London WC2N 5DN]<
> http://www.nationalgallery.org.uk>
> [Chris Ofili: Weaving Magic exhibition]<http://www.nationa
> lgallery.org.uk/whats-on/exhibitions/chris-ofili-weaving-magic>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Semediawiki-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/semediawiki-user
>



--
WikiWorks · MediaWiki Consulting · http://wikiworks.com
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Error starting new form when there is a space at the end of the name.

Joseph Padfield
Hi Yaron

The error from my wiki is pretty much the same, though with slightly different line numbers.

Joe

[2eadff4861f8f8c5dc3cedc3] /wiki/Special:FormStart?page_name=Test+&form=Event Wikimedia\Assert\ParameterAssertionException from line 63 of /var/www/www-mediawiki/mediawiki-1.28.2/vendor/wikimedia/assert/src/Assert.php: Bad value for parameter $dbkey: invalid DB key

Backtrace:

#0 /var/www/www-mediawiki/mediawiki-1.28.2/includes/title/TitleValue.php(81): Wikimedia\Assert\Assert::parameter(boolean, string, string)
#1 /var/www/www-mediawiki/mediawiki-1.28.2/includes/specialpage/SpecialPage.php(100): TitleValue->__construct(integer, string, string)
#2 /var/www/www-mediawiki/mediawiki-1.28.2/includes/specialpage/SpecialPage.php(84): SpecialPage::getTitleValueFor(string, string, string)
#3 /var/www/www-mediawiki/mediawiki-1.28.2/includes/specialpage/SpecialPage.php(629): SpecialPage::getTitleFor(string, string)
#4 /var/www/www-mediawiki/mediawiki-1.28.2/includes/specialpage/SpecialPage.php(618): SpecialPage->getPageTitle(string)
#5 /var/www/www-mediawiki/mediawiki-1.28.2/extensions/PageForms/specials/PF_FormStart.php(126): SpecialPage->getTitle(string)
#6 /var/www/www-mediawiki/mediawiki-1.28.2/extensions/PageForms/specials/PF_FormStart.php(160): PFFormStart::getFormEditURL(string, string)
#7 /var/www/www-mediawiki/mediawiki-1.28.2/extensions/PageForms/specials/PF_FormStart.php(80): PFFormStart->doRedirect(string, string, NULL)
#8 /var/www/www-mediawiki/mediawiki-1.28.2/includes/specialpage/SpecialPage.php(522): PFFormStart->execute(NULL)
#9 /var/www/www-mediawiki/mediawiki-1.28.2/includes/specialpage/SpecialPageFactory.php(577): SpecialPage->run(NULL)
#10 /var/www/www-mediawiki/mediawiki-1.28.2/includes/MediaWiki.php(283): SpecialPageFactory::executePath(Title, RequestContext)
#11 /var/www/www-mediawiki/mediawiki-1.28.2/includes/MediaWiki.php(851): MediaWiki->performRequest()
#12 /var/www/www-mediawiki/mediawiki-1.28.2/includes/MediaWiki.php(512): MediaWiki->main()
#13 /var/www/www-mediawiki/mediawiki-1.28.2/index.php(43): MediaWiki->run()
#14 {main}
________________________________
From: [hidden email] [[hidden email]] on behalf of Yaron Koren [[hidden email]]
Sent: 27 June 2017 19:09
To: Padfield, Joseph
Cc: [hidden email]
Subject: Re: [Semediawiki-user] Error starting new form when there is a space at the end of the name.

Hi Joe,

All the form functionality comes from an extension called Page Forms. I'd ask you what version you're running, but it's probably not that relevant, because that Sandbox wiki is running the latest version of PF, and they have the same problem that you do.

I have wikis that are also running the latest version of PF, and none of them have this particular bug, so I don't know what's causing it. Perhaps it has to do with the MediaWiki version, or the version of PHP, or with some Apache configuration. (I tried setting one of my wikis to use French, and I still couldn't get that error, so I don't think it's that.)

Out of curiosity, is the backtrace you see for the error on your wiki more or less the same as the one on the Sandbox wiki?

-Yaron

On Tue, Jun 27, 2017 at 1:22 PM, Joseph Padfield <[hidden email]<mailto:[hidden email]>> wrote:
Hi,

I have spotted a bug when trying to create new pages with forms. I noticed the error with:

MediaWiki     1.28.2
Semantic MediaWiki     2.5.2

But you can also see the error starting: https://sandbox.semantic-mediawiki.org/wiki/Formulaire:Book

Type in a new title and end the string with a space, then click "Create or edit"

I tried with the title " Test " and got the following error:

[203bf4dc5c0817f59e5a72d3] /wiki/Sp%C3%A9cial:AjouterPage?page_name=Test+&form=Book Wikimedia\Assert\ParameterAssertionException from line 63 of /var/www/htdocs/mw/02100/w/vendor/wikimedia/assert/src/Assert.php: Bad value for parameter $dbkey: invalid DB key 'AjouterDonnées/Book/Test_'

Backtrace:

#0 /var/www/htdocs/mw/02100/w/includes/title/TitleValue.php(82): Wikimedia\Assert\Assert::parameter(boolean, string, string)
#1 /var/www/htdocs/mw/02100/w/includes/specialpage/SpecialPage.php(100): TitleValue->__construct(integer, string, string)
#2 /var/www/htdocs/mw/02100/w/includes/specialpage/SpecialPage.php(84): SpecialPage::getTitleValueFor(string, string, string)
#3 /var/www/htdocs/mw/02100/w/includes/specialpage/SpecialPage.php(629): SpecialPage::getTitleFor(string, string)
#4 /var/www/htdocs/mw/02100/w/includes/specialpage/SpecialPage.php(618): SpecialPage->getPageTitle(string)
#5 /var/www/htdocs/mw/02100/w/extensions/PageForms/specials/PF_FormStart.php(126): SpecialPage->getTitle(string)
#6 /var/www/htdocs/mw/02100/w/extensions/PageForms/specials/PF_FormStart.php(157): PFFormStart::getFormEditURL(string, string)
#7 /var/www/htdocs/mw/02100/w/extensions/PageForms/specials/PF_FormStart.php(80): PFFormStart->doRedirect(string, string, NULL)
#8 /var/www/htdocs/mw/02100/w/includes/specialpage/SpecialPage.php(522): PFFormStart->execute(NULL)
#9 /var/www/htdocs/mw/02100/w/includes/specialpage/SpecialPageFactory.php(578): SpecialPage->run(NULL)
#10 /var/www/htdocs/mw/02100/w/includes/MediaWiki.php(287): SpecialPageFactory::executePath(Title, RequestContext)
#11 /var/www/htdocs/mw/02100/w/includes/MediaWiki.php(862): MediaWiki->performRequest()
#12 /var/www/htdocs/mw/02100/w/includes/MediaWiki.php(523): MediaWiki->main()
#13 /var/www/htdocs/mw/02100/w/index.php(43): MediaWiki->run()
#14 {main}

Thanks

Joe

--
Joseph Padfield
Conservation Scientist
Scientific Department
The National Gallery
Trafalgar Square
London WC2N 5DN
+44 (0)20 7747 2553<tel:%2B44%20%280%2920%207747%202553>
http://research.ng-london.org.uk
http://www.twitter.com/JoePadfield
[The National Gallery, Trafalgar Square, London WC2N 5DN]<http://www.nationalgallery.org.uk>
[Chris Ofili: Weaving Magic exhibition]<http://www.nationalgallery.org.uk/whats-on/exhibitions/chris-ofili-weaving-magic>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Semediawiki-user mailing list
[hidden email]<mailto:[hidden email]>
https://lists.sourceforge.net/lists/listinfo/semediawiki-user



--
WikiWorks · MediaWiki Consulting · http://wikiworks.com

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Loading...