Jump to content

Topic on Extension talk:Semantic Title/Flow

Not playing with ExtendedSearch

4
Kghbln (talkcontribs)

Then trying to refresh (inital indexing went smooth) the search index for the Extended Search extension I got for following query error with a stack trace:


A database query error has occured.

Query:

INSERT INTO `49275_page_props` (pp_page,pp_propname,pp_value) VALUES ('1577','displaytitle','MyTitle') Funktion: SemanticTitleHooks::setDisplayTitle

Error:

1062 Duplicate entry '1577-displaytitle' for key 'pp_page_propname' (localhost)

Backtrace:

#0 /.../w/includes/db/Database.php(901): DatabaseBase->reportQueryError('Duplicate entry...', 1062, 'INSERT  INTO `4...', 'SemanticTitleHo...', false)
#1 /.../w/includes/db/Database.php(1464): DatabaseBase->query('INSERT  INTO `4...', 'SemanticTitleHo...')
#2 /.../w/extensions/SemanticTitle/SemanticTitleHooks.php(103): DatabaseBase->insert('page_props', Array, 'SemanticTitleHo...')
#3 /.../w/extensions/SemanticTitle/SemanticTitleHooks.php(53): SemanticTitleHooks::setDisplayTitle(Object(Title), 'Weisung zur Mul...')
#4 [internal function]: SemanticTitleHooks::onParserBeforeStrip(Object(Parser), '{{KIWIPageHeade...', Object(StripState))
#5 /.../w/includes/Hooks.php(195): call_user_func_array('SemanticTitleHo...', Array)
#6 /.../w/includes/parser/Parser.php(443): Hooks::run('ParserBeforeStr...', Array)
#7 /.../w/includes/content/WikitextContent.php(331): Parser->parse('{{PageHeade...', Object(Title), Object(ParserOptions), true, true, NULL)
#8 /.../w/includes/content/AbstractContent.php(497): WikitextContent->fillParserOutput(Object(Title), NULL, Object(ParserOptions), true, Object(ParserOutput))
#9 /.../w/extensions/BlueSpiceExtensions/ExtendedSearch/includes/BuildIndex/BuildIndexMainControl.class.php(699): AbstractContent->getParserOutput(Object(Title))
#10 /.../w/extensions/BlueSpiceExtensions/ExtendedSearch/includes/BuildIndex/BuildIndexMwArticles.class.php(126): BuildIndexMainControl->prepareTextForIndex(Object(Title))
#11 /.../w/extensions/BlueSpiceExtensions/ExtendedSearch/includes/BuildIndex/BuildIndexMainControl.class.php(263): BuildIndexMwArticles->indexCrawledDocuments()
#12 /.../w/extensions/BlueSpiceExtensions/ExtendedSearch/includes/BuildIndex/BuildIndexMainControl.class.php(398): BuildIndexMainControl->buildIndexWiki('Indexiere Wiki ...')
#13 /.../w/extensions/BlueSpiceExtensions/ExtendedSearch/maintenance/searchUpdate.php(27): BuildIndexMainControl->buildIndex()
#14 /.../w/maintenance/doMaintenance.php(103): SearchUpdate->execute()
#15 /.../w/extensions/BlueSpiceExtensions/ExtendedSearch/maintenance/searchUpdate.php(38): require_once('/var/www/html/0...')
#16 {main}

Do you think this issue lies within Semantic Title or should this be addressed with the creators of the Extended Search extension?

Cindy.cicalese (talkcontribs)

This is probably due to the way SemanticTitle sets the displaytitle page property. This property is really only supposed to be set by the parser when the DISPLAYTITLE magic word is used on a page. SemanticTitle retains the ability to set the display title from a property, but this is mostly for backward compatibility. I have seen that error before, but it is usually transient. I encourage you to switch to using DISPLAYTITLE if possible. If you use the DISPLAYTITLE magic word, a property holding the display title will automatically be created for you, so it can still be queried.

Kghbln (talkcontribs)

Thanks a lot for your feedback! Switching to DISPLAYTITLE is actually what I recommended to the users of the respective wiki as a sane way to avoid this issue. Since it is future best practice anyway ... Still I did not want to withhold the info on the error in case other things perhaps relate to it.

Cindy.cicalese (talkcontribs)

Excellent! Thank you!

Reply to "Not playing with ExtendedSearch"