Skip to content

Using onAfterDataUpdateComplete hook#1

Open
Fannon wants to merge 5 commits intoArchiXL:masterfrom
Fannon:master
Open

Using onAfterDataUpdateComplete hook#1
Fannon wants to merge 5 commits intoArchiXL:masterfrom
Fannon:master

Conversation

@Fannon
Copy link
Copy Markdown

@Fannon Fannon commented May 31, 2016

Hello!

Thank's for open-sourcing this extension!

This fork is a bigger rewrite of this extension and to some extend a very different approach to the problem, with different advantages and disadvantages. Feel free to to ignore this pull request or only take parts of it. This rewrite is very oppinionated. I'd be interested in your oppinion on it.

It might be an idea to merge the old and the new SDE behavior and let the user choose it through a setting.

Fixes

SDE did not work with pages having a namespace. This is fixed by using $title->getPrefixedText() instead of $title->getText() when constructing the queries.

Changes

  • Instead of using the ArticleSaveComplete hook, we decided to use the SMW::SQLStore::AfterDataUpdateComplete SMW >= 2.3 hook. This has the advantage that the dummy edit is only triggered when data actually changes (usually in a job queue item). It also ensures that the queries for the SDE dependencies makes will always work as the data has already been stored. (We had issues with that). The disadvantage is that this behaviour cannot guarantuee an avoidance of loops. This is imho unlikely anyway and probably a sign of a modeling mistake anyway.

New Features

  • Made the recursive dependency lookup optional. With the new hook, recursive lookup might not be needed at all, as it is automatically updating -on demand-

Fannon added 5 commits May 30, 2016 17:52
…ook instead of page save complete

* Fixed issues with namespaces in page titles
* Cleanup
…ted page contains at least one of the declared SDERelation properties
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant