Hi Yaron,
thank you very much. Finally we can get rid of the patch.
Best regards,
Thomas
Von: yaro...@gmail.com [mailto:yaro...@gmail.com] Im Auftrag von Yaron Koren
Gesendet: Mittwoch, 27. Juli 2011 15:13
An: Thomas Schweitzer
Cc: Ellis, Peter C; semediawiki-devel@lists.sourceforge.net
Betreff: Re: [SMW-devel] [SF][HaloACL] Bug in Semantic Forms/HaloACL calls?
Hi,
Oh, wow - I didn't realize that this was the last needed patch; that's good
news. I just added the extra parameter for the hook, to the SF code in SVN.
-Yaron
On Wed, Jul 27, 2011 at 5:51 AM, Thomas Schweitzer
<schweit...@ontoprise.de<mailto:schweit...@ontoprise.de>> wrote:
Hi Peter,
this is fixed in my patch patch_for_SF_2.x.x.txt. The correct code is:
if (defined('HACL_HALOACL_VERSION')) {
// The title with possible protection has to be passed
wfRunHooks( 'sfUserCanEditPage',
array($this->mPageTitle, &$userCanEditPage ) );
} else {
// Original code
wfRunHooks( 'sfUserCanEditPage', array(&$userCanEditPage
) );
}
Actually, the first version of wfRunHooks is correct but I left the original
code in the patch. A call to 'sfUserCanEditPage' does not make sense without
passing the page title.
I asked Yaron to fix this a while ago (March 30th, 2011) but he has not done it
yet. It would be nice if we could get rid of this patch as it is the last and
only patch for SF.
Best regards,
Thomas
-----Ursprüngliche Nachricht-----
Von: Ellis, Peter C [mailto:peter.el...@pnnl.gov<mailto:peter.el...@pnnl.gov>]
Gesendet: Donnerstag, 30. Juni 2011 18:37
An:
semediawiki-devel@lists.sourceforge.net<mailto:semediawiki-devel@lists.sourceforge.net>
Betreff: [SMW-devel] [SF][HaloACL] Bug in Semantic Forms/HaloACL calls?
We've run into an interesting issue on Semantic Forms and HaloACL, and I'm not
entirely sure which piece of software is responsible, so I'm posting here
rather than filing a bug report. First, the requisite system parameters:
MediaWiki 1.16.0
PHP 5.3.4 (apache2handler)
MySQL 5.0.91-log
Semantic Forms 2.1.2
HaloACL 1.3.0_0 [B216]
When we go to a form page (Special:FormEdit, in our case), we end up with the
following error:
Warning: Missing argument 2 for HACLEvaluator::onSfUserCanEditPage() in
/Volumes/DataHD/WebServer/hudson_dev/dsp/wiki/extensions/HaloACL/includes/HACL_Evaluator.php
on line 687 Catchable fatal error: Argument 1 passed to
HACLEvaluator::checkPropertyAccess() must be an instance of Title, boolean
given, called in
/Volumes/DataHD/WebServer/hudson_dev/dsp/wiki/extensions/HaloACL/includes/HACL_Evaluator.php
on line 120 and defined in
/Volumes/DataHD/WebServer/hudson_dev/dsp/wiki/extensions/HaloACL/includes/HACL_Evaluator.php
on line 1213
Digging into it, it looks like HaloACL's onSfUserCanEditPage hook expects two
parameters sent:
public static function onSfUserCanEditPage($title, &$userCanEdit) (line 687,
includes/HACL_Evaluator.php)
However, Semantic Forms is only sending one parameter - a Boolean - when the
hook fires:
wfRunHooks( 'sfUserCanEditPage', array( &$userCanEditPage ) );
(includes\SF_FormPrinter.php line 324)
Yaron, Ontoprise folks, any insights? I'd fix it myself, but I'm not clear
what title parameter it expects - it looks like, from the Semantic Forms code,
that passing $this->mPageTitle out of sfUserCanEditPage would fix the problem,
but I'd prefer not to do that if it clobbers other things...
__________________________________________________
Peter Ellis
Scientist
Knowledge Discovery and Informatics
Pacific Northwest National Laboratory
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes sense
of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net<mailto:Semediawiki-devel@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
------------------------------------------------------------------------------
Got Input? Slashdot Needs You.
Take our quick survey online. Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net<mailto:Semediawiki-devel@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
--
WikiWorks · MediaWiki Consulting · http://wikiworks.com
------------------------------------------------------------------------------
Got Input? Slashdot Needs You.
Take our quick survey online. Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel