Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wikibase Local Media breaks requests for .ttl format at Special:EntityData #16

Open
Bayugoon opened this issue Apr 16, 2022 · 21 comments
Open
Labels
bug Something isn't working

Comments

@Bayugoon
Copy link

Bayugoon commented Apr 16, 2022

I created a phabricator ticket: https://phabricator.wikimedia.org/T306288
but I feel like this might be a more appropriate place to report this

Setup

  • Wikibase Local Media version: master
  • Wikibase version: REL_37
  • MediaWiki version: 1.37.2
  • PHP version: 8.08

Issue

When the local media extension is enabled requesting .ttl format from Special:EntityData will return a undescriptive error, disabling the extension allows for the request to be successful, images can be found in the phabricator ticket linked above.

@Bayugoon Bayugoon added the bug Something isn't working label Apr 16, 2022
@Bayugoon Bayugoon changed the title Wikibase Local Media breaks requests for .ttl format at Special:EntityData Wikibase Local Media breaks All Special Pages Apr 16, 2022
@Bayugoon Bayugoon changed the title Wikibase Local Media breaks All Special Pages Wikibase Local Media breaks Special:EntityData & Special:SpecialPages Apr 16, 2022
@Bayugoon
Copy link
Author

I tried using the latest release and I get the same issue

@JeroenDeDauw
Copy link
Member

Can you put the following in your LocalSettings.php file, and provide the error info you get? Afterwards, best to remove the snippet from LocalSettings.php again.

error_reporting( -1 );
ini_set( 'display_errors', 1 );

$wgShowExceptionDetails = true;
$wgDebugDumpSql = true;
$wgDebugComments = true;

@python-coding-404

This comment was marked as spam.

@Bayugoon
Copy link
Author

I only really noticed this because my WDQS wasn't working properly, the runUpdate.sh script couldn't get information from entities even if they had a Local Media property or not, does WDQS support Local Media?

@Bayugoon
Copy link
Author

Bayugoon commented Apr 16, 2022

image
This commit removed the function that caused the errors.

8f35b7a

@Bayugoon
Copy link
Author

looks like you need to change that function call to "WikibaseRepo::getDefaultValueFormatterBuilders()" instead

@Bayugoon
Copy link
Author

Actually my file has the old function that got removed:

public function getFormatterBuilder(): FormatterBuilder {
return new FormatterBuilder(
WikibaseRepo::getDefaultInstance()->getDefaultValueFormatterBuilders(),
$GLOBALS['wgThumbLimits']
);
}

I should probably switch back to the master branch and see if it is a different error that occurs.

@Bayugoon
Copy link
Author

now that I'm using the master branch again it only doesn't work for .ttl format
Special:EntityData/Q1.ttl:

[87ce7246dc8953a96a69b511] /wiki/Special:EntityData/Q1.ttl Error: Undefined constant Wikibase\Repo\Rdf\PropertyRdfBuilder::OBJECT_PROPERTY

Backtrace:

from /var/www/mediawiki/w/extensions/WikibaseLocalMedia/src/HookHandlers.php(29)
#0 /var/www/mediawiki/w/extensions/Wikibase/lib/includes/DataTypeDefinitions.php(336): Wikibase\LocalMedia\HookHandlers::Wikibase\LocalMedia{closure}()
#1 [internal function]: Wikibase\Lib\DataTypeDefinitions->Wikibase\Lib{closure}()
#2 /var/www/mediawiki/w/extensions/Wikibase/lib/includes/DataTypeDefinitions.php(342): array_map()
#3 /var/www/mediawiki/w/extensions/Wikibase/repo/WikibaseRepo.entitytypes.php(388): Wikibase\Lib\DataTypeDefinitions->getRdfDataTypes()
#4 [internal function]: Wikimedia\Services\ServiceContainer->{closure}()
#5 /var/www/mediawiki/w/extensions/Wikibase/repo/includes/Rdf/EntityRdfBuilderFactory.php(87): call_user_func()
#6 /var/www/mediawiki/w/extensions/Wikibase/repo/includes/Rdf/EntityRdfBuilderFactory.php(59): Wikibase\Repo\Rdf\EntityRdfBuilderFactory->createEntityRdfBuilders()
#7 /var/www/mediawiki/w/extensions/Wikibase/repo/includes/Rdf/RdfBuilder.php(101): Wikibase\Repo\Rdf\EntityRdfBuilderFactory->getEntityRdfBuilders()
#8 /var/www/mediawiki/w/extensions/Wikibase/repo/includes/Rdf/RdfBuilderFactory.php(45): Wikibase\Repo\Rdf\RdfBuilder->__construct()
#9 /var/www/mediawiki/w/extensions/Wikibase/repo/includes/LinkedData/EntityDataSerializationService.php(338): Wikibase\Repo\Rdf\RdfBuilderFactory->getRdfBuilder()
#10 /var/www/mediawiki/w/extensions/Wikibase/repo/includes/LinkedData/EntityDataSerializationService.php(146): Wikibase\Repo\LinkedData\EntityDataSerializationService->createRdfBuilder()
#11 /var/www/mediawiki/w/extensions/Wikibase/repo/includes/LinkedData/EntityDataRequestHandler.php(551): Wikibase\Repo\LinkedData\EntityDataSerializationService->getSerializedData()
#12 /var/www/mediawiki/w/extensions/Wikibase/repo/includes/LinkedData/EntityDataRequestHandler.php(285): Wikibase\Repo\LinkedData\EntityDataRequestHandler->showData()
#13 /var/www/mediawiki/w/extensions/Wikibase/repo/includes/Specials/SpecialEntityData.php(112): Wikibase\Repo\LinkedData\EntityDataRequestHandler->handleRequest()
#14 /var/www/mediawiki/w/includes/specialpage/SpecialPage.php(647): Wikibase\Repo\Specials\SpecialEntityData->execute()
#15 /var/www/mediawiki/w/includes/specialpage/SpecialPageFactory.php(1366): SpecialPage->run()
#16 /var/www/mediawiki/w/includes/MediaWiki.php(314): MediaWiki\SpecialPage\SpecialPageFactory->executePath()
#17 /var/www/mediawiki/w/includes/MediaWiki.php(930): MediaWiki->performRequest()
#18 /var/www/mediawiki/w/includes/MediaWiki.php(564): MediaWiki->main()
#19 /var/www/mediawiki/w/index.php(53): MediaWiki->run()
#20 /var/www/mediawiki/w/index.php(46): wfIndexMain()
#21 {main}

@Bayugoon Bayugoon changed the title Wikibase Local Media breaks Special:EntityData & Special:SpecialPages Wikibase Local Media breaks requests for .ttl format at Special:EntityData Apr 16, 2022
@Bayugoon
Copy link
Author

Also noticed that with the error logging coding enabled when I create an item there is some odd text at the top of the page when I create a new item:
image

@Bayugoon
Copy link
Author

I am using foreign file repos, I'll disable that and see if it makes a difference.

@Bayugoon
Copy link
Author

Disabling Foreign File Repos didn't seem to effect anything

@Bayugoon
Copy link
Author

Special:SpecialPages works on the master branch btw

@JeroenDeDauw
Copy link
Member

The latest release of this extension is indeed not compatible with Wikibase 37. The master branch is more compatible, but it might still not fully work, depending on how many things got moved around or renamed in Wikibase. Would be nice if Wikimedia Deutschland spend some effort on avoiding such downstream pain.

@Bayugoon
Copy link
Author

So would my best bet to use Wikibase and MediaWiki 36 to get the extension to work properly?

@JeroenDeDauw
Copy link
Member

Yup.

Actually now that I think about it, Wikimedia Deutschland did not even get round to releasing an official version of Wikibase 37 and they recently announced they will skip that version entirely.

@Bayugoon
Copy link
Author

Ah ok, the download page for wikibase had a release for 37 so I assumed it would be good to go:
https://www.mediawiki.org/wiki/Special:ExtensionDistributor/Wikibase

@python-coding-404

This comment was marked as spam.

@python-coding-404

This comment was marked as spam.

@python-coding-404

This comment was marked as spam.

@python-coding-404

This comment was marked as spam.

@python-coding-404

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants