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

Semantic Cite Update #124

Open
akshamoor opened this issue Feb 3, 2024 · 4 comments
Open

Semantic Cite Update #124

akshamoor opened this issue Feb 3, 2024 · 4 comments

Comments

@akshamoor
Copy link

Good Day:

Semantic Cite is an excellent extension. But I have FOMO for the latest Semantic MediaWiki.

I have failed to install Semantic Cite under: MediaWiki higher than 1.35.x and Semantic MediaWiki higher than 3.2.3.

I have attempted without success:
composer update --with-all-dependencies
composer composer update --no-dev

I have attempted this on a Mac, on Windows 10 and 11 using XAMPP and under Windows 11 > WSL2 > Ubuntu 20.04. Retrying is an annual hobby.

My present versions:
Windows 11
Microsoft WSL2
Ubuntu 20.04.
PHP: 7.4.3
MariaDB: 10.3.39
MediaWiki: 1.35.10
Semantic MediaWiki: 3.2.3
Semantic Cite: 2.1.1

My wiki is local only; no external access.

Here is an error message. Please excuse my use of PRE tags.

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires mediawiki/semantic-cite ~2.1 -> satisfiable by mediawiki/semantic-cite[2.1.0, 2.1.1].
    - mediawiki/semantic-cite[2.1.0, ..., 2.1.1] require mediawiki/semantic-media-wiki ~3.0 -> found mediawiki/semantic-media-wiki[3.0.0, ..., 3.2.3] but it conflicts with your root composer.json require (~4.1).

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

Thank you
Clarence Pettis

@D-Groenewegen
Copy link

Hi Clarence, the latest release (SC 3.0) was released in November last year. Support for Semantic MediaWiki 4.0 (not 4.1) was added, although this issue still appears to be open: #107.

Anyway, try installing SC with SMW 4.0 instead and if you continue to experience issues with your installation, head over to the issue board for SemanticCite and leave a post there.

@JeroenDeDauw JeroenDeDauw transferred this issue from SemanticMediaWiki/SemanticMediaWiki Feb 5, 2024
@z929669
Copy link

z929669 commented May 16, 2024

Senantic Cite 3.0.0 installs and performs for me without issue under Semantic Mediawiki 4.1.3, resolving all of my previous issues with v2.1 under Semantic Mediawiki 4.0. Also, #107 is closed now and consistent with my current results (under SMW ~4.0).

I should also mention that I am running PHP 8.1.

Thanks all.

UPDATE:
Looks like I spoke too soon. Everything was working properly yesterday, so I wonder if I must run some SMW maintenance scripts. Current error on a page using Semantic Cite 3.0.0:

[30ecc1788684c10fd15e6eba] /wiki/SkyrimSE:Display_Settings RuntimeException: Error 1146: Table 'wiki.765_smw_fpt_sci_cite_key' doesn't exist
Function: SMW\SQLStore\QueryEngine\QueryEngine::getInstanceQueryResult
Query: SELECT DISTINCT t0.smw_id AS id,t0.smw_title AS t,t0.smw_namespace AS ns,t0.smw_iw AS iw,t0.smw_subobject AS so,t0.smw_sortkey AS sortkey FROM `765_smw_object_ids` AS t0 INNER JOIN `765_smw_fpt_sci_cite_key` AS t1 ON t0.smw_id=t1.s_id WHERE ((t1.o_hash='Bayesian statistics')) AND t0.smw_iw!=':smw' AND t0.smw_iw!=':smw-delete' AND t0.smw_iw!=':smw-redi' LIMIT 15

#0 /srv/sites/_wiki/includes/libs/rdbms/database/Database.php(1602): Wikimedia\Rdbms\Database->getQueryException()
#1 /srv/sites/_wiki/includes/libs/rdbms/database/Database.php(1576): Wikimedia\Rdbms\Database->getQueryExceptionAndLog()
#2 /srv/sites/_wiki/includes/libs/rdbms/database/Database.php(952): Wikimedia\Rdbms\Database->reportQueryError()
#3 /srv/sites/_wiki/includes/libs/rdbms/database/Database.php(1711): Wikimedia\Rdbms\Database->query()
#4 /srv/sites/_wiki/includes/libs/rdbms/database/DBConnRef.php(103): Wikimedia\Rdbms\Database->select()
#5 /srv/sites/_wiki/includes/libs/rdbms/database/DBConnRef.php(326): Wikimedia\Rdbms\DBConnRef->__call()
#6 /srv/sites/_wiki/extensions/SemanticMediaWiki/src/MediaWiki/Connection/Database.php(247): Wikimedia\Rdbms\DBConnRef->select()
#7 /srv/sites/_wiki/extensions/SemanticMediaWiki/src/SQLStore/QueryEngine/QueryEngine.php(414): SMW\MediaWiki\Connection\Database->select()
#8 /srv/sites/_wiki/extensions/SemanticMediaWiki/src/SQLStore/QueryEngine/QueryEngine.php(225): SMW\SQLStore\QueryEngine\QueryEngine->getInstanceQueryResult()
#9 /srv/sites/_wiki/extensions/SemanticMediaWiki/src/Query/Cache/ResultCache.php(250): SMW\SQLStore\QueryEngine\QueryEngine->getQueryResult()
#10 /srv/sites/_wiki/extensions/SemanticMediaWiki/src/MediaWiki/Hooks.php(1404): SMW\Query\Cache\ResultCache->getQueryResult()
#11 /srv/sites/_wiki/includes/HookContainer/HookContainer.php(338): SMW\MediaWiki\Hooks->onBeforeQueryResultLookupComplete()
#12 /srv/sites/_wiki/includes/HookContainer/HookContainer.php(137): MediaWiki\HookContainer\HookContainer->callLegacyHook()
#13 /srv/sites/_wiki/extensions/SemanticMediaWiki/src/SQLStore/SQLStore.php(380): MediaWiki\HookContainer\HookContainer->run()
#14 /srv/sites/_wiki/extensions/SemanticCite/src/CitationResourceMatchFinder.php(198): SMW\SQLStore\SQLStore->getQueryResult()
#15 /srv/sites/_wiki/extensions/SemanticCite/src/CitationResourceMatchFinder.php(135): SCI\CitationResourceMatchFinder->findMatchForCitationReference()
#16 /srv/sites/_wiki/extensions/SemanticCite/src/ReferenceListOutputRenderer.php(320): SCI\CitationResourceMatchFinder->findCitationTextFor()
#17 /srv/sites/_wiki/extensions/SemanticCite/src/ReferenceListOutputRenderer.php(219): SCI\ReferenceListOutputRenderer->findCitationTextFor()
#18 /srv/sites/_wiki/extensions/SemanticCite/src/ReferenceListOutputRenderer.php(192): SCI\ReferenceListOutputRenderer->createHtmlFromJournal()
#19 /srv/sites/_wiki/extensions/SemanticCite/src/CachedReferenceListOutputRenderer.php(246): SCI\ReferenceListOutputRenderer->doRenderReferenceListFor()
#20 /srv/sites/_wiki/extensions/SemanticCite/src/CachedReferenceListOutputRenderer.php(137): SCI\CachedReferenceListOutputRenderer->getRenderedHtmlReferenceList()
#21 /srv/sites/_wiki/extensions/SemanticCite/src/CachedReferenceListOutputRenderer.php(98): SCI\CachedReferenceListOutputRenderer->addReferenceListToCorrectTextPosition()
#22 /srv/sites/_wiki/extensions/SemanticCite/src/HookRegistry.php(351): SCI\CachedReferenceListOutputRenderer->addReferenceListToText()
#23 /srv/sites/_wiki/includes/HookContainer/HookContainer.php(338): SCI\HookRegistry->SCI\{closure}()
#24 /srv/sites/_wiki/includes/HookContainer/HookContainer.php(137): MediaWiki\HookContainer\HookContainer->callLegacyHook()
#25 /srv/sites/_wiki/includes/HookContainer/HookRunner.php(2686): MediaWiki\HookContainer\HookContainer->run()
#26 /srv/sites/_wiki/includes/OutputPage.php(2221): MediaWiki\HookContainer\HookRunner->onOutputPageBeforeHTML()
#27 /srv/sites/_wiki/includes/OutputPage.php(2233): OutputPage->addParserOutputText()
#28 /srv/sites/_wiki/includes/page/Article.php(773): OutputPage->addParserOutput()
#29 /srv/sites/_wiki/includes/page/Article.php(621): Article->doOutputFromParserCache()
#30 /srv/sites/_wiki/includes/page/Article.php(528): Article->generateContentOutput()
#31 /srv/sites/_wiki/includes/actions/ViewAction.php(78): Article->view()
#32 /srv/sites/_wiki/includes/MediaWiki.php(542): ViewAction->show()
#33 /srv/sites/_wiki/includes/MediaWiki.php(322): MediaWiki->performAction()
#34 /srv/sites/_wiki/includes/MediaWiki.php(904): MediaWiki->performRequest()
#35 /srv/sites/_wiki/includes/MediaWiki.php(562): MediaWiki->main()
#36 /srv/sites/_wiki/index.php(50): MediaWiki->run()
#37 /srv/sites/_wiki/index.php(46): wfIndexMain()
#38 {main}

Backtrace:

from /srv/sites/_wiki/extensions/SemanticMediaWiki/src/MediaWiki/Connection/Database.php(255)
#0 /srv/sites/_wiki/extensions/SemanticMediaWiki/src/SQLStore/QueryEngine/QueryEngine.php(414): SMW\MediaWiki\Connection\Database->select()
#1 /srv/sites/_wiki/extensions/SemanticMediaWiki/src/SQLStore/QueryEngine/QueryEngine.php(225): SMW\SQLStore\QueryEngine\QueryEngine->getInstanceQueryResult()
#2 /srv/sites/_wiki/extensions/SemanticMediaWiki/src/Query/Cache/ResultCache.php(250): SMW\SQLStore\QueryEngine\QueryEngine->getQueryResult()
#3 /srv/sites/_wiki/extensions/SemanticMediaWiki/src/MediaWiki/Hooks.php(1404): SMW\Query\Cache\ResultCache->getQueryResult()
#4 /srv/sites/_wiki/includes/HookContainer/HookContainer.php(338): SMW\MediaWiki\Hooks->onBeforeQueryResultLookupComplete()
#5 /srv/sites/_wiki/includes/HookContainer/HookContainer.php(137): MediaWiki\HookContainer\HookContainer->callLegacyHook()
#6 /srv/sites/_wiki/extensions/SemanticMediaWiki/src/SQLStore/SQLStore.php(380): MediaWiki\HookContainer\HookContainer->run()
#7 /srv/sites/_wiki/extensions/SemanticCite/src/CitationResourceMatchFinder.php(198): SMW\SQLStore\SQLStore->getQueryResult()
#8 /srv/sites/_wiki/extensions/SemanticCite/src/CitationResourceMatchFinder.php(135): SCI\CitationResourceMatchFinder->findMatchForCitationReference()
#9 /srv/sites/_wiki/extensions/SemanticCite/src/ReferenceListOutputRenderer.php(320): SCI\CitationResourceMatchFinder->findCitationTextFor()
#10 /srv/sites/_wiki/extensions/SemanticCite/src/ReferenceListOutputRenderer.php(219): SCI\ReferenceListOutputRenderer->findCitationTextFor()
#11 /srv/sites/_wiki/extensions/SemanticCite/src/ReferenceListOutputRenderer.php(192): SCI\ReferenceListOutputRenderer->createHtmlFromJournal()
#12 /srv/sites/_wiki/extensions/SemanticCite/src/CachedReferenceListOutputRenderer.php(246): SCI\ReferenceListOutputRenderer->doRenderReferenceListFor()
#13 /srv/sites/_wiki/extensions/SemanticCite/src/CachedReferenceListOutputRenderer.php(137): SCI\CachedReferenceListOutputRenderer->getRenderedHtmlReferenceList()
#14 /srv/sites/_wiki/extensions/SemanticCite/src/CachedReferenceListOutputRenderer.php(98): SCI\CachedReferenceListOutputRenderer->addReferenceListToCorrectTextPosition()
#15 /srv/sites/_wiki/extensions/SemanticCite/src/HookRegistry.php(351): SCI\CachedReferenceListOutputRenderer->addReferenceListToText()
#16 /srv/sites/_wiki/includes/HookContainer/HookContainer.php(338): SCI\HookRegistry->SCI\{closure}()
#17 /srv/sites/_wiki/includes/HookContainer/HookContainer.php(137): MediaWiki\HookContainer\HookContainer->callLegacyHook()
#18 /srv/sites/_wiki/includes/HookContainer/HookRunner.php(2686): MediaWiki\HookContainer\HookContainer->run()
#19 /srv/sites/_wiki/includes/OutputPage.php(2221): MediaWiki\HookContainer\HookRunner->onOutputPageBeforeHTML()
#20 /srv/sites/_wiki/includes/OutputPage.php(2233): OutputPage->addParserOutputText()
#21 /srv/sites/_wiki/includes/page/Article.php(773): OutputPage->addParserOutput()
#22 /srv/sites/_wiki/includes/page/Article.php(621): Article->doOutputFromParserCache()
#23 /srv/sites/_wiki/includes/page/Article.php(528): Article->generateContentOutput()
#24 /srv/sites/_wiki/includes/actions/ViewAction.php(78): Article->view()
#25 /srv/sites/_wiki/includes/MediaWiki.php(542): ViewAction->show()
#26 /srv/sites/_wiki/includes/MediaWiki.php(322): MediaWiki->performAction()
#27 /srv/sites/_wiki/includes/MediaWiki.php(904): MediaWiki->performRequest()
#28 /srv/sites/_wiki/includes/MediaWiki.php(562): MediaWiki->main()
#29 /srv/sites/_wiki/index.php(50): MediaWiki->run()
#30 /srv/sites/_wiki/index.php(46): wfIndexMain()
#31 {main}

In my dev environment where the only difference is that it doesn't receive many edits, and I'm not running any SMW maintenance scripts via cron, I have all of the Semantic Cite-related tables, but all are missing now in production, so something nuked them:

765_smw_fpt_sci_cite
765_smw_fpt_sci_cite_key
765_smw_fpt_sci_cite_reference
765_smw_fpt_sci_cite_text

I also noticed the following missing from production:

765_smw_fpt_sci_doi
765_smw_fpt_sci_oclc
765_smw_fpt_sci_olid
765_smw_fpt_sci_pmcid
765_smw_fpt_sci_pmid
765_smw_fpt_sci_viaf

My current suspicion is that my SMW maintenance scripts resumed via cron at a clumsy point after upgrade, so I'm manually resetting the data store and rebuilding the data.


UPDATE: My suspicions seem correct. I'm still running the last command here, but the missing tables are restored, and I expect all will be kosher once I finish. Maintenance scripts I used in the order listed:

# php /srv/sites/_wiki/extensions/SemanticMediaWiki/maintenance/setupStore.php --delete
# php /srv/sites/_wiki/extensions/SemanticMediaWiki/maintenance/setupStore.php

# php /srv/sites/_wiki/extensions/SemanticMediaWiki/maintenance/rebuildData.php -p
# php /srv/sites/_wiki/extensions/SemanticMediaWiki/maintenance/rebuildData.php -fpcv
# php /srv/sites/_wiki/extensions/SemanticMediaWiki/maintenance/rebuildData.php -fpcv	[ yes, run it again ]
# php /srv/sites/_wiki/extensions/SemanticMediaWiki/maintenance/rebuildData.php --force-update --auto-recovery -v   [ still running ]

Confirmed this fixed my issue, so my original post stands.

@krabina
Copy link
Contributor

krabina commented May 16, 2024

Did you try running update.php? That should check for all tables needed.

@z929669
Copy link

z929669 commented May 17, 2024

Yes, I did run update.php when I updated PHP from 8.0-->8.1 and MW from 1.39.5-->1.39.7. All was kosher then, because the tables were created properly (or perhaps they still lingered from failed attempts to install Semantic Cite v2.1 last year). However, some process nuked the tables I mentioned, and it would've had to be a SMW maintenance script I have in cron. I can think of nothing else that would cause it (since I didn't change anything). I copied a snapshot of my server and switched the floating IP over once all was updated is all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants