re: having both "Has default form" and "Creates pages with form" 
I don't know to what degree you mean "shouldn't." If you're speaking of if the 
code supports this, it probably currently doesn't; it's a hack I added by 
commenting out one "return false"  in SemanticForms\includes\SF_LinkUtils.php, 
in the setBrokenLink functions:

static function setBrokenLink( $linker, $target, $options, $text, &$attribs, 
&$ret ) {
if ( in_array( 'broken', $options ) ) {
if ( self::createLinkedPage( $target ) ) {
  // commented out by donundeen
  //return true;
}
$link = self::formEditLink( $target );
if ( $link != '' ) {
$attribs['href'] = $link;
}
}
return true;
}

 I suppose it's possible some of my tweaks are causing some of my bugs, but if 
other people are having similar problems, it'll at least give me an idea of 
where to look for solutions.


But in the other terms of "shouldn't," as in "there's no good reason to do 
that," I'd have to disagree. "Creates pages with form"  adds rows to runjobs, 
so 
the page will get created at some point in the future, when that job runs. 
"Uses 
default form" means that page will get created when someone clicks that link, 
ie, right when they need it. I don't see any way that those two things should 
be 
mutually exclusive. The alternative is either:
1. Only use "Creates" : means while we're waiting for runJobs to do it's thing, 
people will have red links they can't do anything about. Worse, clicking on 
that 
will lead to a blank page, which they may then fill out. Meaning when runjobs 
happens, that page won't get created correctly.
2. Only use "default form" : means that someone will have to go manually and 
click all those red links to create the pages. That's not a viable option 
either.

So I don't see why you wouldn't support both properties working. Especially 
since it seems to involve commenting out one "return false" in the code.



________________________________
From: Yaron Koren <yaro...@gmail.com>
To: don undeen <donund...@yahoo.com>
Cc: smw dev list <semediawiki-devel@lists.sourceforge.net>
Sent: Wed, December 8, 2010 9:36:21 PM
Subject: Re: [SMW-devel] Semantic forms not "Edit With Form"-ing?

Hi,

I don't know how much I can help you, since you're using a modified version of 
an older version of SF. Hopefully one of the SMW+ people can assist here. I do 
have one question, though: why do you have both "Has default form" and "Creates 
pages with form" set for the same property? That shouldn't be done, as far as I 
know.

-Yaron


On Wed, Dec 8, 2010 at 6:49 PM, don undeen <donund...@yahoo.com> wrote:

ok, so I ran a bunch of tests, and it seems like, 
>if I add a new "highlights object" object number, and that page doesn't exist 
>yet, then the category for that page doesn't get registered, or disappears 
>from 
>the categorylinks table, and I don't get an "Edit with form" link.
>
>
>that "Highlights Object" property is one that "creates pages with form" AND 
>"has 
>default form" so there's a lot going on there that could cause screwy 
>behaviour, 
>I bet.
>
>
>However, once I do a runJobs, which automatically creates that page, and I 
>re-save the original page, I get the categorylinks entry back.
>
>
>this seems like a strange edge case, but still, it indicates some wierd 
>interactions in the code...
>
>
>Don
>
>
>
________________________________
From: don undeen <donund...@yahoo.com>
>To: don undeen <donund...@yahoo.com>; smw dev list 
><semediawiki-devel@lists.sourceforge.net>
>Sent: Wed, December 8, 2010 6:01:51 PM
>Subject: Re: [SMW-devel] Semantic forms not "Edit With Form"-ing?
>
>
>
>to add a little more detail:
>I was lookign at the categorylinks table, and noticed that the category 
>information for the new article is dropped, after the page is saved again, or 
>if 
>I do a runJobs after editing the template (hence causing a SMWUpdatejob)
>
>Any idea why that would happen? Maybe there's an erro in my template code? I 
>can't figure it out.
>Any and all help would be greatly appreciated.
>
>Thanks very much!
>
>
>
>
>
>
________________________________
From: don undeen <donund...@yahoo.com>
>To: smw dev list <semediawiki-devel@lists.sourceforge.net>
>Sent: Wed, December 8, 2010 5:33:40 PM
>Subject: [SMW-devel] Semantic forms not "Edit With Form"-ing?
>
>
>Hey guys,
>I've got a simple semantic form and template, which I can use successfully to 
>create a new page.
>Then, I can click "Edit With Form" and edit (or not) and re-save the page.
>However, once I've done that, I can no longer "Edit with form"; the link isn't 
>there, and when I try to just enter the original "edit form form" link, I'm 
>told 
>it's not a valid URL.
>
>Any idea what could be going on? 
>Version Info (the latest supported by SMWHalo):
>MW 1.15.3 
>SF 1.9.1_1 (w/ halo patches)
>
>Header Table 0.6.6
>SMW 1.5.1_1 (w/ halo patches)
>SMWHalo Version 1.5.1_4-for-SMW-1.5.1 [B47]
>
>
>My Form Code is:
><noinclude>
>This is the "Thematic Tour" form.
>To create a page with this form, enter the page name below;
>if a page with that name already exists, you will be sent to a form to edit 
>that 
>page.
>
>
>{{#forminput:form=Thematic Tour}}
></noinclude><includeonly>
>{{{info|add title=Add a new Thematic Tour|page name=<Thematic Tour[Thematic 
>Tour 
>Name]>}}}
>
><div id="wikiPreview" style="display: none; padding-bottom: 25px; 
>margin-bottom: 
>25px; border-bottom: 1px solid #AAAAAA;"></div>
>{{{for template|Thematic  Tour}}}
>{| class="formtable"
>! Thematic Tour Name:
>| {{{field|Thematic Tour Name}}}
>|-
>! Highlights Objects:
>| {{{field|Highlights  Objects|autocomplete from  url=met_objects}}}
>|-
>! Related Activities:
>| {{{field|Related Activities|input type=textarea}}}
>|}
>{{{end template}}}
>
>'''Free text:'''
>
>{{{standard input|free text|rows=10}}}
>
>
>{{{standard input|summary}}}
>
>{{{standard input|minor edit}}} {{{standard input|watch}}}
>
>{{{standard input|save}}} {{{standard input|preview}}} {{{standard 
>input|changes}}} {{{standard input|cancel}}}
></includeonly>
>
>And My template code is:
><noinclude>
>This is the "Thematic Tour"  template.
>It should be called in the following format:
><pre>
>{{Thematic Tour
>|Thematic Tour Name=
>|Highlights Objects=
>}}
></pre>
>Edit the page to see the template text.
></noinclude><includeonly>
>__SHOWFACTBOX__
>
>{| class="wikitable"
>! Thematic Tour Name
>| [[ThematicTourName::{{{Thematic Tour Name|}}}]]
>|-
>! Highlights Objects
>| {{#arraymap:{{{Highlights Objects|}}}|,|x|[[HighlightsObject::x]]}}
>|-
>!  Related  Activities
>| {{{Related Activities|}}}
>|}
>
>[[Category:Thematic Tour]]
></includeonly>
>
>Any Ideas?
>
>Thanks all!
>
>
>------------------------------------------------------------------------------
>This SF Dev2Dev email is sponsored by:
>
>WikiLeaks The End of the Free Internet
>http://p.sf.net/sfu/therealnews-com
>_______________________________________________
>Semediawiki-devel mailing list
>Semediawiki-devel@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
>
>


-- 
WikiWorks · MediaWiki Consulting · http://wikiworks.com
------------------------------------------------------------------------------
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

Reply via email to