https://bugzilla.wikimedia.org/show_bug.cgi?id=57760

--- Comment #37 from MWJames <[email protected]> ---
(In reply to comment #36)
> > therefore is not recognised by SMW.
> 
> Why not? This is still before any SMW logic uses the globals or initializes
> something with them no?

No, the LocalSettings function { ... } is called after the SMW initialization
causing a deviation, this is what the test case [1] is for. Because the values
initialized by LocalSettings function { ... } and that known to SMW are
different. [1] was wrote with the objective in mind to verify that at moment
SMW\Setup initializes it has the default and the adopted values from
LocalSettings available to execute SMW\Setup.

The whole Settings stuff (default vs custom) is becoming really tricky now due
to a different loading priority (because of when defaults are loaded) therefore
extra care needs to be put forward to those edge cases and [2] didn't solve the
problem as [1] failed.

For example, you need to run smwfInitNamespaces() within SMW's function { ... }
because needs $smwgNamespaceIndex to be known but that can only happen after
after the LocalSettings initialization otherwise SMW_NS_PROPERTY can be defined
and only than $smwgNamespacesWithSemanticLinks can contain default values
including SMW_NS_PROPERTY.

[1] https://github.com/SemanticMediaWiki/SemanticMediaWiki/pull/45

[2] https://github.com/SemanticMediaWiki/SemanticMediaWiki/pull/40

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to