Page MenuHomePhabricator

Error from line 289 of TitleIcon.php: Undefined class constant 'TYPE_STRING'
Closed, ResolvedPublic

Description

Setup
MW 1.31.1, PHP 7.1.22, Semantic MediaWiki 3.0.0 and TitelIcon 4.0

Issue
... Error from line 289 of .../extensions/TitleIcon/TitleIcon.php: Undefined class constant 'TYPE_STRING'

Backtrace

#0 ../extensions/TitleIcon/TitleIcon.php(224): TitleIcon->getPropertyValues(Title, string)
#1 ../extensions/TitleIcon/TitleIcon.php(161): TitleIcon->getIcons()
#2 ../extensions/TitleIcon/TitleIcon.php(138): TitleIcon->getIconHTML()
#3 ../extensions/TitleIcon/TitleIcon.php(74): TitleIcon->handlePageTitle(OutputPage)
#4 ../includes/Hooks.php(177): TitleIcon::showIconInPageTitle(OutputPage, SkinChameleon)
#5 ../includes/Hooks.php(237): Hooks::callHook(string, array, array, NULL, string)
#6 ../includes/OutputPage.php(2385): Hooks::runWithoutAbort(string, array)
#7 ../includes/MediaWiki.php(868): OutputPage->output(boolean)
#8 ../includes/MediaWiki.php(880): MediaWiki->{closure}()
#9 ../includes/MediaWiki.php(524): MediaWiki->main()
#10 ../index.php(42): MediaWiki->run()
#11 {main}

Semantic MediaWiki 3.0 has deprecated TYPE_STRING resulting in errors in Title Icon 4. The code at https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/TitleIcon/+/master/TitleIcon.php#289 will need to be updated as was done in https://gerrit.wikimedia.org/r/c/mediawiki/extensions/CommentStreams/+/449388/2/includes/Comment.php.

https://www.mediawiki.org/w/index.php?title=Topic:Umrm3byrwhzxo52w&topic_showPostId=umrnrcef1w1kl3wp&fromnotif=1#flow-post-umrnrcef1w1kl3wp

Event Timeline

Kghbln renamed this task from Title Icon error in SMW 3.x to Error from line 289 of TitleIcon.php: Undefined class constant 'TYPE_STRING'.Oct 17 2018, 3:24 PM
Kghbln updated the task description. (Show Details)
Kghbln subscribed.

@Krabina: Did @CCicalese_WMF explicitly agree on being assigned to this? (If that's the case, maybe @cicalese was meant?)

CCicalese_WMF subscribed.

Yup, that should be the other me. Thank you, @Aklapper.

Change 481283 had a related patch set uploaded (by Cicalese; owner: Cicalese):
[mediawiki/extensions/TitleIcon@master] Fixed to work with SMW 3.0.0.

https://gerrit.wikimedia.org/r/481283

Change 481283 merged by jenkins-bot:
[mediawiki/extensions/TitleIcon@master] Fixed to work with SMW 3.0.0.

https://gerrit.wikimedia.org/r/481283