James, thanks for the prompt reply. I'm satisfied that disabling the SMW
hooks when GraphViz does an upload will have no bad consequences because
GraphViz does not supply any page text on this code path. A user could
edit the file page after the upload is complete and supply page
text/annotations as desired.
On Sat, Nov 29, 2014 at 2:41 PM, James HK <jamesin.hongkon...@gmail.com>
wrote:
> Hi,
>
> This may be of interest, Stephan run into a similar `Parser->lock`
> issue on MW 1.24 with SF (see [0]).
>
> [0]
> https://github.com/WikiApiary/WikiApiary/issues/209#issuecomment-64195735
>
> Cheers
>
> On 11/30/14, James HK <jamesin.hongkon...@gmail.com> wrote:
> > Hi,
> >
> > Just to clarify, NewRevisionFromEditComplete does not have (or for
> > that matter makes) access to the Parser directly and relies on the
> > information provided by WikitextContent::prepareContentForEdit object.
> > Whether WikitextContent::prepareContentForEdit returns an `editinfo`
> > object from a cached instance or runs Parser:parse is out of the scope
> > and control of the NewRevisionFromEditComplete hook.
> >
> >> My question is, what is the consequence to an installation with SMW
> >> installed if the NewRevisionFromEditComplete hook does not run for
> images
> >> uploaded by GraphViz?
> >
> > If you disable NewRevisionFromEditComplete or any other SMW related
> > hook then it will suppress annotation parsing and should not much
> > matter for your GraphViz images. If predefined properties or user
> > defined properties can not be annotated then those pages can also not
> > be used for any query.
> >
> > Cheers
> >
> > On 11/30/14, Keith Welter <welte...@gmail.com> wrote:
> >> Hi,
> >> I'm looking for some input on a fix I wrote for an SMW/GraphViz interop
> >> bug
> >> (phabricator T75073 <https://phabricator.wikimedia.org/T75073>).
> >>
> >> To recap the bug:
> >>
> >>
> >> 1. The GraphViz extension uploaded a file (a graph image) from the
> >> context of a Parser::parse call.
> >> 2. The upload triggered the NewRevisionFromEditComplete hook.
> >> 3. The Semantic MediaWiki extension NewRevisionFromEditComplete hook
> >> eventually called Parser::parse (indirectly) which causes the
> reported
> >> Invalid Marker exception.
> >>
> >> My fix is to disable all hooks while GraphViz is uploading a file. The
> >> only hook on the upload code path is NewRevisionFromEditComplete but for
> >> simplicity and future-proofing I disable all hooks.
> >>
> >> My question is, what is the consequence to an installation with SMW
> >> installed if the NewRevisionFromEditComplete hook does not run for
> images
> >> uploaded by GraphViz?
> >>
> >> Thanks in advance for your help,
> >>
> >> Keith
> >>
> >
>
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel