Page MenuHomePhabricator

(Reference) URI's cannot be created by non-admin users
Closed, ResolvedPublicBUG REPORT

Description

I'm a non-admin user on https://florencia.wikibase.cloud/wiki/Main_Page. When trying to add a reference using property "Reference URL" of type URL with a link, I get the error below:

Screenshot from 2023-01-24 10-43-33.png (436×1 px, 32 KB)

I get the same error when adding a normal statement with property type URL and a URL.

We'd like for all successfully registered users to be able to contribute to a Wikibase. There should be no errors.


Issue likely caused by locking down URL entries to reduce spam, since its' a spam sensitive case.
Multiple tickets surrounding this issue have been created, see mentioned and duplicate.

Suspicion: There's a Captcha somewhere that's not visible.
Possible fix we tried but did not work:

LocalSettings.php
// Don't try to let users answer captchas if they try to add links
// on either Item or Property pages. Bug T86453
$wgCaptchaTriggersOnNamespace[WB_NS_ITEM]['addurl'] = false;
$wgCaptchaTriggersOnNamespace[WB_NS_PROPERTY]['addurl'] = false;

Further work to investigate this issue:

  • Using a debugger look for errors thrown when trying to make edits like this

Event Timeline

Evelien_WMDE renamed this task from Reference URI's cannot be created by non-admin users to (Reference) URI's cannot be created by non-admin users.Jan 24 2023, 10:10 AM
Evelien_WMDE updated the task description. (Show Details)
Evelien_WMDE updated the task description. (Show Details)
Evelien_WMDE added subscribers: Addshore, So9q, OlafJanssen.

So basically you cannot add external URL, only internal one. Anyway the setting @Tarrow mentioned doesn't exist in LocalSettings.php

Screenshot from 2023-03-07 17-46-05.png (257×947 px, 18 KB)

Cool! So you found an exception to the issue: local URLs work fine.

Did you try adding those variables to LocalSettings.php? Not all variables that you can set are already set to something in LocalSettings.php. They may just be using a default.

I used to have that same error of my wikibase.cloud https://kbtestwikibase.wikibase.cloud/, for which I originally reported T310419 (issue is closed now)

But it seems to have been magically solved now, I can now add external URLs without error, see eg https://kbtestwikibase.wikibase.cloud/wiki/Property:P43, to which I added the Wikidata URI (see history)

My credentials are emailconfirmed and Autoconfirmed users

afbeelding.png (353×1 px, 32 KB)

https://kbtestwikibase.wikibase.cloud/w/index.php?title=Special%3AUserRights&user=OlafJanssen

This comment was removed by OlafJanssen.
dang removed dang as the assignee of this task.Mar 23 2023, 9:16 AM
dang moved this task from Doing to Sprint Backlog on the Wikibase Cloud (WB Cloud Sprint 16) board.
dang added a subscriber: dang.

Helpful history and context:

I finally fix the bug. Basically you need to add $ceAllowConfirmedEmail = true; in LocalSettings.php to allow email confirmed users to add url (see this)

Also we forgot to add $wgAllowConfirmedEmail = true;, which means $wgGroupPermissions['emailconfirmed']['skipcaptcha'] = true; doesn't work.

The initial fix

$wgCaptchaTriggersOnNamespace[WB_NS_ITEM]['addurl'] = false;
$wgCaptchaTriggersOnNamespace[WB_NS_PROPERTY]['addurl'] = false;

doesn't work because WB_NS_ITEM and WB_NS_PROPERTY are not defined.

Checkout the PR:
https://github.com/wbstack/mediawiki/pull/356

dang removed dang as the assignee of this task.May 16 2023, 2:03 PM
dang moved this task from Doing to In Review on the Wikibase Cloud (WB Cloud Sprint 20) board.
This comment was removed by dang.
Fring removed Fring as the assignee of this task.May 17 2023, 11:44 AM
Fring added a subscriber: Fring.

@Deniz_WMDE / @dang Tested and verified that it works, thanks folks :)

Evelien_WMDE claimed this task.