From: Ralf K. <ral...@kr...> - 2014-03-05 12:14:06
|
Hi Yaron, I finally changed the wiki script path to "/w", but that did not help. The discoursedb.org example you mentioned really works. I compared the implementation to my example, found some minor diffs and did some changes: a) Using SIO instead of #subobject (the discoursedb.org example is using SIO). Result: No success. b) Changed property value from "Text" to "String" and added a "Has default form" to the property page. Result: No success. c) Removed the space from the template "Template:Website_Component" to become "Template:WebsiteComponent". Result: No success. d) Using numbered parameters like {{{1}}} instead of named parameters in "Template:WebsiteComponent", changed the "values dependent on" references in the form accordingly. Result: No success. I refreshed the SMW database after each change. To summarize, I changed anything to become as close to the discoursedb.org example as possible, but that did not help. Very, very strange. I am confused ... and stuck. Any other idea? Cheers Ralf On Tuesday 04 March 2014 Yaron Koren wrote: > Hi, > > Yes, you can see "values dependent on" working, for both existing and new > instances in a form, in "Opinions for this item", here: > > http://discoursedb.org/w/index.php?title=Picture_IDs_are_perfectly_sensible& > action=formedit > > -Yaron > > > On Tue, Mar 4, 2014 at 10:08 AM, Ralf Krüdewagen > > <ral...@kr...>wrote: > > Hi Yaron, > > > > thanks for your quick response. > > > > On Tuesday 04 March 2014 Yaron Koren wrote: > > > Hi Ralf, > > > > > > Yes, that's some bad behavior. I don't know what's causing it - I > > > > certainly > > > > > haven't seen that problem elsewhere. Looking through the form, and the > > > site, I see a few things that seem odd, that may be leading to this > > > > > problem, either by themselves or in combination: > > Does that mean that you think that "values dependent on" should also work > > for > > editing items? And that there are maybe examples in the net? > > > > > - The use of "/wiki" both as a folder name and as a URL alias seems to > > > be > > > causing some problems. The recommended approach is to give the directory > > > > a > > > > > different name, like "/w", to avoid ambiguity. In your case, it looks > > > > like > > > > > you have special handling for folders like "/wiki/skins" and > > > "/wiki/resources", so that the server knows that they're folder names > > > and > > > not page names, but there's no special handling for "/wiki/extensions", > > > which may be causing some issues. > > > > OK, I can change that - but not before tomorrow morning CET. So, I need > > some > > time ;-) > > > > > - In the form, the inclusion of "minimum instances=0" seems unnecessary, > > > and may be causing some strangeness - I don't know. > > > > Well, I set it to 0 after it was set to 1 initially (by copy/paste). > > Removed > > it now. > > > > > - The property "Has website component" has a blank "allowed value". > > > > That's > > > > > actually due (I'm guessing) to a bug in Special:CreateClass, that's > > > since > > > been fixed, but maybe getting rid of the blank value will get things > > > back > > > to normal. > > > > I removed that blank item. > > > > However, solving issues #2 and #3 did not help yet. Will come back if I > > changed #1. > > > > Thanks > > Ralf > > > > > -Yaron > > > > > > On Tue, Mar 4, 2014 at 3:31 AM, Ralf Krüdewagen > > > > > > <ral...@kr...>wrote: > > > > Hi again, > > > > > > > > unfortunately, the method with "values dependent on=" does not fully > > > > work. > > > > > > For adding new subobjects, it works as expected. It just offers the > > > > dependent > > > > values according to the template and field name defined in the form. > > > > Fine! > > > > > > But: Once you want to edit a subobject (with the form) ALL values are > > > > displayed or autocompleted in the combobox - the dependency does not > > > > work > > > > > > here. I assume that this is a bug - or I really missed something. > > > > > > > > Example page (I just allowed anonymous edits for this page for > > > > testing): > > > > https://www.kruedewagen.de/wiki/Websites/ODME > > > > > > > > Test Case 1) > > > > > > > > "Edit with form" this page and ADD a new component. Select e.g. Python > > > > as > > > > > > "Software". The dropdown list and autocompletion is limited to "2.6" > > > > and > > > > > > "2.7" > > > > which are the values from this page and a 2nd page > > > > https://kruedewagen.de/wiki/Websites/Kr%C3%BCdewagen_Blog. > > > > > > > > Result: Fine! That works. > > > > > > > > Test Case 2) > > > > > > > > "Edit with form" this page and EDIT the existing component with > > > > "Software" > > > > > > = > > > > "Python". The dropdown list and autocompletion is NOT limited to the > > > > Python > > > > versions added on any page. It just contains the FULL list of > > > > "Version" > > > > values, even them not related to "Python", e.g. 5.5 which is a PHP > > > > version. > > > > > > > > Some more info about used form/templates/properties: > > > > > > > > Form: > > > > https://www.kruedewagen.de/wiki/Form:Website > > > > > > > > Main template: > > > > https://www.kruedewagen.de/wiki/Template:Website > > > > https://www.kruedewagen.de/wiki/Property:Has_website_title > > > > https://www.kruedewagen.de/wiki/Property:Has_website_URL > > > > > > > > Multi-instance template: > > > > https://www.kruedewagen.de/wiki/Template:Website_Component > > > > https://www.kruedewagen.de/wiki/Propertyt:Is_website_component_of > > > > https://www.kruedewagen.de/wiki/Property:Has_website_component > > > > https://www.kruedewagen.de/wiki/Property:Has_website_component_version > > > > > > > > Any help is appreciated. It would really we nice if that would fully > > > > work > > > > > > even > > > > for edits, not only for new items. > > > > > > > > Thanks > > > > Ralf > > |