problem with "edit with form" tab

7 views
Skip to first unread message

madnan

unread,
Apr 12, 2008, 2:59:57โ€ฏAM4/12/08
to Semantic Forms
hi,
I have installed Halo3wiki package, which includes ( mediwiki and
semantic mediawiki). Then I installed Semantic Forms version 1.0.2.
while following the instruction in the "example" given in the semantic
form wiki page when I want to edit the form using "edit with form" tab
nothing happens after clicking on the tab. I can do the editing using
"edit" tab only. I really need to have a form based editing, please
help me out.

Mehnaz

Yaron Koren

unread,
Apr 13, 2008, 11:24:45โ€ฏAM4/13/08
to semanti...@googlegroups.com
Hi,

Could you be more specific as to what happens when you click on the "edit with form" tab? Since that tab is a link, I assume something does happen.

-Yaron

madnan

unread,
Apr 14, 2008, 1:50:06โ€ฏAM4/14/08
to Semantic Forms
Thanks for reply, When i want to add a new page it allows to do it in
the form. But when trying to edit previosly created page using "edit
with form" tab the url changes (for example
http://localhost/mediawiki/index.php?title=This_is_my_book&action=formedit)
but it shows only view page i.e. does not show a form which offers
editing. then for editing I need to click on "edit" tab which will
take me to wiki editor.

Mehnaz
> > Mehnaz- Hide quoted text -
>
> - Show quoted text -

Yaron Koren

unread,
Apr 14, 2008, 9:19:22โ€ฏAM4/14/08
to semanti...@googlegroups.com
Okay, thanks for the explanation. Hm - I've never heard of such a thing happening, and looking through the code again, I can't see how it would happen. My only guess is that somehow the Halo extension that you have installed is interfering with the behavior of the forms. Could you try removing the include of Halo from your LocalSettings.php file, and seeing if that has any effect?

-Yaron

madnan

unread,
Apr 14, 2008, 6:17:35โ€ฏPM4/14/08
to Semantic Forms
Thanks, I have done with out Halo extension and it is working now.
Further I want to give the user my own text input library like YUI for
some of the fields in the form. Is ther any way to do it.

Mehnaz

On Apr 15, 1:19ย am, "Yaron Koren" <yaro...@gmail.com> wrote:
> Okay, thanks for the explanation. Hm - I've never heard of such a thing
> happening, and looking through the code again, I can't see how it would
> happen. My only guess is that somehow the Halo extension that you have
> installed is interfering with the behavior of the forms. Could you try
> removing the include of Halo from your LocalSettings.php file, and seeing if
> that has any effect?
>
> -Yaron
>
>
>
> On Mon, Apr 14, 2008 at 1:50 AM, madnan <mehnaz...@hotmail.com> wrote:
>
> > Thanks for reply, When i want to add a new page it allows to do it in
> > the form. But when trying to edit previosly created page using "edit
> > with form" tab the url changes (for example
> >http://localhost/mediawiki/index.php?title=This_is_my_book&action=for...
> > )
> > but it shows only view page i.e. does not show a form which offers
> > editing. then for editing I need to click on "edit" tab which will
> > take me to wiki editor.
>
> > Mehnaz
>
> > On Apr 14, 3:24 am, "Yaron Koren" <yaro...@gmail.com> wrote:
> > > Hi,
>
> > > Could you be more specific as to what happens when you click on the
> > "edit
> > > with form" tab? Since that tab is a link, I assume something does
> > happen.
>
> > > -Yaron
>
> > > On Sat, Apr 12, 2008 at 2:59 AM, madnan <mehnaz...@hotmail.com> wrote:
>
> > > > hi,
> > > > I have installed Halo3wiki package, which includes ( mediwiki and
> > > > semantic mediawiki). Then I installed Semantic Forms version 1.0.2.
> > > > while following the instruction in the "example" given in the semantic
> > > > form wiki page when I want to edit the form using "edit with form" tab
> > > > nothing happens after clicking on the tab. I can do the editing using
> > > > "edit" tab only. I really need to have a form based editing, please
> > > > help me out.
>
> > > > Mehnaz- Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -

madnan

unread,
Apr 14, 2008, 9:34:35โ€ฏPM4/14/08
to Semantic Forms
Hi,
It seems that problem is sovled for now but is there any way I can use
semantic forms with halo extension. In fact that insatllation gives
really good thing like ontology browser which I cannot use after
removing haloextension from localsettings.php

Mehnaz

Yaron Koren

unread,
Apr 14, 2008, 9:58:55โ€ฏPM4/14/08
to semanti...@googlegroups.com
Well, it's good to know about that problem with Halo, although it's too bad that there's a problem. I don't use Halo myself, so I have no idea. My guess is that Halo might be intercepting whatever actions you call the page with. Out of curiosity, what happens if you change action to some nonsense string, like "action=abcd"? Does it show an "unknown action" error, or does it just display the page?

I know there are some people on this mailing list who use both Halo and SF - has anyone seen that editing problem before?

As for your other question, what exactly do you want to do with the text inputs?

-Yaron

madnan

unread,
Apr 15, 2008, 3:43:38โ€ฏAM4/15/08
to Semantic Forms
I change action to 'abcd' and for this string nothing happens. It does
not show "unknown action" error just display the page.

For text input I want to give a "text aware" assistance to user. For
example if a form have some fields in which a user has to input some
specific terminologies defined in a taxonomy/ontology , how we can
provide assistance to users for input of these terminogies. Just have
a thought that this functionality might be provided like YUI.

Mehnaz

Yaron Koren

unread,
Apr 15, 2008, 8:56:34โ€ฏAM4/15/08
to semanti...@googlegroups.com
Okay, that definitely sounds like a bug in Halo; you should contact the Halo developers about it.

As for the text assistance: assuming you want more than just autocompletion, there's no way that SF can handle every type of interface. Your best solution might be to create a new extension that uses Semantic Forms' "input type hook" to define a new input type, that you can then use in your form; see http://www.mediawiki.org/wiki/Extension:Semantic_Forms/Defining_new_inputs.

-Yaron

Guoqian Jiang

unread,
Apr 15, 2008, 10:30:39โ€ฏAM4/15/08
to semanti...@googlegroups.com
I guess this is related to annotate tab that uses the same array index for edit with form tab and get confliction happen. This is why you disable Halo and then the edit with form tab work.
ย 
One approach is that you just disable annotate tab if you do not use this tab. The other approach may be that semantic forms provide a more intelligent way to detect the tab position to avoid this conflict.
ย 
Hope this helpful.
ย 
-Guoqian






> Date: Tue, 15 Apr 2008 00:43:38 -0700
> Subject: [Semantic Forms] Re: problem with "edit with form" tab
> From: mehn...@hotmail.com
> To: semanti...@googlegroups.com

Yaron Koren

unread,
Apr 15, 2008, 10:43:26โ€ฏAM4/15/08
to semanti...@googlegroups.com
Well, as Mehnaz noted, it's the "action=..." part of the URL that's getting ignored (probably because Halo is intercepting it). It might well be that it's the code for Halo's "annotate" tab that's causing the problem, but I doubt that changing the placement of the tabs by itself will solve the issue.

-Yaron

Guoqian Jiang

unread,
Apr 15, 2008, 11:17:01โ€ฏAM4/15/08
to semanti...@googlegroups.com
ย 
see the source code. You may give a diagnosis.
ย 

function smwfAnnotateTab ($content_actions) {
ย //Check if ontoskin is available
ย global $wgUser;
ย if($wgUser->getSkin()->skinname != 'ontoskin')
ย ย return true;
ย //Check if edit tab is present, if not don't at annote tab
ย if (!array_key_exists('edit',$content_actions) )
ย ย return true;
ย global $wgUser, $wgRequest;
ย $action = $wgRequest->getText( 'action' );
ย //Build annotate tab
ย global $wgTitle;ย 
ย $content_actions['main'] = array(
ย ย ย ย ย ย ย  ย 'class' => ($action == 'annotate') ? 'selected' : false,
ย ย ย ย ย ย ย  ย 'text' => wfMsg('smw_annotation_tab'), //Title of the tab
ย ย ย ย ย ย ย  ย 'href' => $wgTitle->getLocalUrl('action=annotate')ย ย  //where it links to
ย );
ย ย ย ย ย  ย 
ย //Find position of edit button
ย $editpos = count(range(0,$content_actions['edit']))+1;
ย //Split array
ย $beforeedit = array_slice($content_actions,0,$editpos-1);
ย $afteredit = array_slice($content_actions,$editpos-1,count($content_actions));
ย //Merge array with new action
ย $content_actions = array_merge( $beforeedit, $main_action);ย ย  //add a new action
ย $content_actions = array_merge( $content_actions, $afteredit);
ย return true;
}
ย 



ย 

Date: Tue, 15 Apr 2008 10:43:26 -0400
From: yar...@gmail.com
To: semanti...@googlegroups.com

Yaron Koren

unread,
Apr 15, 2008, 11:54:26โ€ฏAM4/15/08
to semanti...@googlegroups.com
I don't think that's it; that's just the code that creates the tab. There's probably a function somewhere that gets added to the 'UnknownAction' hook, and that's where the problem is. Actually, I have a guess as to what the bug is: if you look at the equivalent function in SF, sffEmbeddedEditForm(), here: http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/SemanticForms/specials/SF_EditData.php , you'll see that it returns "true" on failure and "false" on success, in order to get around a bug in MW's handling of that hook. My guess is that the Halo version doesn't do that.

-Yaron

Sentron

unread,
May 28, 2008, 3:19:53โ€ฏPM5/28/08
to Semantic Forms
I had the same problem. I moved the include semantic_forms statements
above include smw_halo statements in my Localsettings.php file. This
made the problem disappear.

It seems that SMW_Halo calls this line in SMW_Initialize.php:

$wgHooks['UnknownAction'][] = 'smwfAnnotateAction';

This seems quite suspicious. I think it makes any later calls to any
other extension hooks invalid?!

So, the problem is not perhaps with the "Annotate" action tab inserted
before the "edit" tab, but may actually be with the issue I mentioned
above.

Though not a fix, what I've found is a good workaround until SMW_Halo
authors fix their bug. Meanwhile, I'll include SMW_Halo as the last
extension in my Localsettings.php.

Thanks,

Senthil.


On Apr 15, 9:54 am, "Yaron Koren" <yaro...@gmail.com> wrote:
> I don't think that's it; that's just the code that creates the tab. There's
> probably a function somewhere that gets added to the 'UnknownAction' hook,
> and that's where the problem is. Actually, I have a guess as to what the bug
> is: if you look at the equivalent function in SF, sffEmbeddedEditForm(),
> here:http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/SemanticF...,
> you'll see that it returns "true" on failure and "false" on success,
> in
> order to get around a bug in MW's handling of that hook. My guess is that
> the Halo version doesn't do that.
>
> -Yaron
>
> > ------------------------------
> > Date: Tue, 15 Apr 2008 10:43:26 -0400
> > From: yaro...@gmail.com
> > To: semanti...@googlegroups.com
> > Subject: [Semantic Forms] Re: problem with "edit with form" tab
>
> > Well, as Mehnaz noted, it's the "action=..." part of the URL that's
> > getting ignored (probably because Halo is intercepting it). It might well be
> > that it's the code for Halo's "annotate" tab that's causing the problem, but
> > I doubt that changing the placement of the tabs by itself will solve the
> > issue.
>
> > -Yaron
>
> > On Tue, Apr 15, 2008 at 10:30 AM, Guoqian Jiang <gqji...@hotmail.com>
> > wrote:
>
> > I guess this is related to annotate tab that uses the same array index for
> > edit with form tab and get confliction happen. This is why you disable Halo
> > and then the edit with form tab work.
>
> > One approach is that you just disable annotate tab if you do not use this
> > tab. The other approach may be that semantic forms provide a more
> > intelligent way to detect the tab position to avoid this conflict.
>
> > Hope this helpful.
>
> > -Guoqian
>
> > ------------------------------
>
> > > Date: Tue, 15 Apr 2008 00:43:38 -0700
> > > Subject: [Semantic Forms] Re: problem with "edit with form" tab
> > > From: mehnaz...@hotmail.com

mitchelln

unread,
Jun 9, 2008, 6:29:02โ€ฏAM6/9/08
to Semantic Forms
I'm having the same trouble with Halo version 1.1. However, if I move
SematicForms above Halo in LocalSettings.php then Halo stops working.
You get SpecialPage does not exist if you click on the Ontologoly
Browser link.

A cannot find smwfAnnotateTab() in any of the Halo code files. Perhaps
they have changed this with version 1.1.
> > theHaloversion doesn't do that.
> > > getting ignored (probably becauseHalois intercepting it). It might well be
> > > that it's the code forHalo's"annotate" tab that's causing the problem, but
> > > > > Well, it's good to know about that problem withHalo, although it's
> > > too bad
> > > > > that there's a problem. I don't useHalomyself, so I have no idea. My
> > > guess
> > > > > is thatHalomight be intercepting whatever actions you call the page
> > > with.
> > > > > Out of curiosity, what happens if you change action to some nonsense
> > > string,
> > > > > like "action=abcd"? Does it show an "unknown action" error, or does it
> > > just
> > > > > display the page?
>
> > > > > I know there are some people on this mailing list who use bothHalo
> > > and SF -
> > > > > has anyone seen that editing problem before?
>
> > > > > As for your other question, what exactly do you want to do with the
> > > text
> > > > > inputs?
>
> > > > > -Yaron
>
> > > > > On Mon, Apr 14, 2008 at 9:34 PM, madnan <mehnaz...@hotmail.com> wrote:
>
> > > > > > Hi,
> > > > > > It seems that problem is sovled for now but is there any way I can
> > > use
> > > > > > semantic forms withhaloextension. In fact that insatllation gives
> > > > > > really good thing like ontology browser which I cannot use after
> > > > > > removing haloextension from localsettings.php
>
> > > > > > Mehnaz
>
> > > > > > On Apr 15, 10:17 am, madnan <mehnaz...@hotmail.com> wrote:
> > > > > > > Thanks, I have done with outHaloextension and it is working now.
> > > > > > > Further I want to give the user my own text input library like YUI
> > > for
> > > > > > > some of the fields in the form. Is ther any way to do it.
>
> > > > > > > Mehnaz
>
> > > > > > > On Apr 15, 1:19 am, "Yaron Koren" <yaro...@gmail.com> wrote:
>
> > > > > > > > Okay, thanks for the explanation. Hm - I've never heard of such
> > > a
> > > > > > thing
> > > > > > > > happening, and looking through the code again, I can't see how
> > > it
> > > > > > would
> > > > > > > > happen. My only guess is that somehow theHaloextension that
> > > you have
> > > > > > > > installed is interfering with the behavior of the forms. Could
> > > you try
> > > > > > > > removing the include ofHalofrom your LocalSettings.php file,

Fitsch

unread,
Jun 16, 2008, 9:17:26โ€ฏAM6/16/08
to Semantic Forms
Hi,

I'm one of the Halo developers and just wanted to let you all know
that we are working on this problem at the moment. The function that
the UnknownAction Hook does call does return false, which is correct,
but the problem still persists. We will have another look at it and
let you all know as soon as we found the problem.

Cheers,
Markus

On 9 Jun., 12:29, mitchelln <mitchellne...@gmail.com> wrote:
> I'm having the same trouble withHaloversion 1.1. However, if I move
> SematicForms aboveHaloin LocalSettings.php thenHalostops working.
> You get SpecialPage does not exist if you click on the Ontologoly
> Browser link.
>
> A cannot find smwfAnnotateTab() in any of theHalocode files. Perhaps

Fitsch

unread,
Jun 16, 2008, 9:27:21โ€ฏAM6/16/08
to Semantic Forms
OK, that one was quick :)
We did not check if our hook is actually the one that is supposed to
be called. To fix the problem, insert the following code:

File: extensions/SMWHalo/includes/SMW_Initialize.php

insert the following code right at the beginning of the function
smwfAnnotateAction (line 950):

if ($action != 'annotate') {
return true;
}

The bugfix will be included in our next release mid/end of July on
sourceforge (http://sourceforge.net/projects/halo-extension).

Regards,
Markus

On 16 Jun., 15:17, Fitsch <fit...@gmail.com> wrote:
> Hi,
>
> I'm one of theHalodevelopers and just wanted to let you all know
> ...
>
> Erfahren Sie mehr ยป
Reply all
Reply to author
Forward
0 new messages