Page MenuHomePhabricator

Extension:Cargo prevents SMW properties to update
Open, Needs TriagePublic

Description

Setup and configuration

  • SMW version: 3.0.0 (abdec88)
  • Cargo version: 2.1.2 (ab7a941)
  • MW version: 1.32.3 (db56d5c)
  • PHP version: 7.1.31-1+0~20190807.22+debian10~1.gbpf402ed (apache2handler)
  • DB system (MySQL, Blazegraph, etc.) and version: 10.3.15-MariaDB-1-log

This was replicated on wmf cloud services:

Issue

Wikis using Extension:Cargo and Extension:Semantic MediaWiki have a bug that prevents SMW properties to update. If a page has a SMW query with a category with a subcategory, the page struggles with setting and keeping SMW properties up-to-date. The bug is not present in the wiki with only SMW installed, it is only present when a wiki has SMW and Cargo installed.

Steps to reproduce

  1. Create a "Category" page.
  2. Create a second "Category" page and make it a subcategory of the first "Category" page. Do this by adding [[Category:(FIRST_CATEGORY_PAGE_NAME)]] to the source code of the second "Category" page.
  3. Create a "Property" page and set the property type (The type does not matter in this test).
  4. Create a page and add it to the first "Category". Do this by adding [[Category:(FIRST_CATEGORY_PAGE_NAME)]] to the source code.
  5. Create a second page and add it to the second "Category". Do this by adding [[Category:(SECOND_CATEGORY_PAGE_NAME)]] to the source code.
  6. Create a third page and use the previously mentioned "Property" in "{{#set:(PROPERTY)=TEST}}"
  7. Check the "Browse properties" page of the third page to make sure the property is setting
  8. Go back to the third page, update the property to a new value and add a query with the first "Category". Example: {{#set:(PROPERTY)=TEST2}}{{#ask:[[Category:(FIRST_CATEGORY_PAGE_NAME)]]}}
  9. After you save your changes, check the "Browse properties" page of the third page again to see if the property's value has updated
  10. Because of the bug, the value of the property will not update. If you edit the page, you can see that the source code shows that the property's value should show as one thing but "Browse properties" shows another.

Event Timeline

vbrooks created this task.Aug 19 2019, 3:48 PM
Restricted Application added subscribers: Liuxinyu970226, Aklapper. · View Herald TranscriptAug 19 2019, 3:48 PM
vbrooks updated the task description. (Show Details)Aug 19 2019, 3:58 PM

Hi,

It's not a bug, it's a "feature". A very strange feature - SMW shuts itself off if Cargo is installed on the wiki, unless the following is added to LocalSettings.php:

$smwgEnabledCompatibilityMode = true;

You can see some discussions about it here, if you're curious:

https://github.com/SemanticMediaWiki/SemanticMediaWiki/issues/1748

Kfield added a subscriber: Kfield.Aug 19 2019, 4:12 PM

This issue occurs even when

$smwgEnabledCompatibilityMode = true;

is set.

Oh. I don't know, then.

Thinking about this again, I still think that this is somehow due to $smwgEnabledCompatibilityMode, if only because I haven't heard of this problem outside of that variable. Maybe this variable is not being handled correctly in recent versions of SMW?

Per Jeroen:

The smwgEnabledCompatibilityMode behavior was only there for a month back in 2016. A code search just showed me that while this setting still exists, it is not doing anything.

Oh! That's good to know in general, outside of this bug. And @Darenwelsh - thanks for translating between the two bug reports. :) I'm back to having no idea - I think someone will have to go into the code and see exactly what's happening.

Aklapper renamed this task from Extension:Cargo causing bug with Semantic MediaWiki properties to Extension:Cargo prevents SMW properties to update.Aug 20 2019, 8:26 PM