|Thread title||Replies||Last modified|
|Don't get it||6||11:10, 9 February 2014|
|Can't disable factbox||0||00:30, 7 February 2014|
I don't understand when the factbox used to be parse and when it will when this variable is set to true:
- was it parsed every time the page was displayed?
- will it be parsed every time changes are previewed as it used to be -- or only after a new version has been saved?
Prior SMW 1.9, the design was that on each page request the factbox would run a Store fetch, transform the data into a string, and parse the string through MW's Parser object in order to inject the result into the Skin object.
If $smwgFactboxUseCache is set false it will do as describe above (legacy behavior) if it is set true then only on a new revision the Factbox is re-build and successively stored as cache object. This means that on each page request the Factbox is retrieved from cache if the revisionId is available otherwise it is rebuild.
For details on the implementation, have a look at the appropriate source and test files (, ).
Thank you, though I still don't get it.
Let me put it another way: what should be the settings to display the factbox based on parsed wikitext (not looked up in the database) on page preview (and not the message "Historical data can not be displayed in a Factbox"), as it used to be before SMW 1.9?
"Historical data" never worked with the Factbox, now it only ensures the users doesn't take it for granted by displaying a message.
If you are still not sure as to what and how
$smwgFactboxUseCache is used (I think the description is quite clear namely to lower latency when Factbox content needs to is parsed), just use the legacy setting (false) and the Factbox build will be executed on each page request whether the content has changed or not.
For some idea about cache vs. non-cached, see .
I have set this variable to true and false. Both ways, I get "Historical data can not be displayed in a Factbox" when I edit a page and nothing at all when I create it.
I am still not sure I have managed to communicate what I try to achieve. I want the factbox to be displayed in the bottom of the page after I press the "Show preview" button (
action=submit), based only on the parsed wikitext, without the page's even needing to exist (
$smwgShowFactboxEdit = SMW_FACTBOX_NONEMPTY did it, I presume), just as it was in SMW 1.8.
Anyway, I look at http://semantic-mediawiki.org/doc/Factbox_8php_source.html, line 244, and see that the message about historical data is shown every time there is an oldid in POST or GET parametres, regardless of any configuration settings. This makes clear why there is a message "Historical...' but not why there is no factbox.