Hi,

Well, defaults and preloads only apply when you're adding a new page (or
data), not editing an existing one - I don't quite understand how your setup
works, but somehow the system needs to differentiate between a user who has
already entered their "favorite" information and one who hasn't.

-Yaron


On Fri, Jul 17, 2009 at 2:56 AM, najevi <naj...@gmail.com> wrote:

>
> == Bug report ==
> {{field ... |default=current user ... }}
>
> is not substituting the name of the user who is currently attempting
> to edit the page using a form. Instead, it is returning the name of
> whichever user initially *created* the current page.
>
> I am certain that is a bug or at best bad description at the
> documentation page:
> http://www.mediawiki.org/wiki/Extension:Semantic_Forms#Form_markup_language
> Quote:
> "
> default=default value - Specifies a default value for this field. For
> date-related fields, default=now will set the value to the current
> date and possibly time. For text fields, default=current user will set
> the value to the username of the user adding this page.
> "
>
> If "|default=now" returned the date-time-stamp of whenever the current
> page was initially *created* than I am certain that a reasonable
> person would consider that to be a bug.
> By that same argument I will assume the present behavior for "|
> default=current user" to also be a bug. ... until told differently!
>
> Test cases:
> http://smwtest.wikia.com/wiki/Special:EditData/Favorites/Skin31  -
> created by user: Delica
> http://smwtest.wikia.com/wiki/Special:EditData/Favorites/Skin27  -
> created by user: Najevi
>
> To assist debug, I have temporarily made the "This user" property
> value visible in that partial form.
>
> == Possibly helpful ==
> IRC user padde reports that the code for this shows:
> [16:34] <padde>  // if the field is a text field, and its default
> value was set
> [16:34] <padde> // to 'current user', and it has no current value, set
> $cur_value
> [16:34] <padde> // to be the current user
> source: includes/SF_FormPrinter.inc
>
> I am a user and not a developer so I don't plan to go investigating
> such include files. As a practical matter I can do nothing about them
> since I rely on Wikia for such "back end" assistance and they also
> seem quite new to SMW/SF.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Semantic Forms" group.
To post to this group, send email to semantic-forms@googlegroups.com
To unsubscribe from this group, send email to 
semantic-forms+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/semantic-forms?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to