cross
New Foswiki release 2.1.6 is available with important security fixes.
Sourceforge foswiki email lists being discontinued. Subscribe to the new Foswiki announce and discuss lists at MailingLists
This question about Using an extension: Asked

User pictures not displayed in MetaComment discussion

I installed MetaCommentPlugin and then PersonalInfoAddon, so that the users can upload pictures of themselves. But instead of the user pictures, the following error message was displayed in the discussion list:
Error: (2) can't find name at Main.TestUser1

I found two problems in metacomments.tmpl in the following lines:
  %IMAGE{
    "%IF{"'%web%.%topic%'/Photo"
      then="$percntFORMFIELD{\"Photo\" topic=\"%web%.%topic%\"}$percnt"
      else="%IF{"'%web%.%topic%'/attachments[name=~'\.(gif|png|jpe?g)$']"
        then="%QUERY{"'%web%.%topic%'/attachments[name=~'\.(gif|png|jpe?g)'][0].name"}%"
        else="%PUBURLPATH%/%SYSTEMWEB%/MetaCommentPlugin/nobody.gif"
      }%"
    }%"
    topic="%web%.%topic%"
    ...
  }%

1. MetaCommentPlugin uses the form field Photo, but PersonalInfoAddon uses the form field Picture. When I change the template to use Picture, the user pictures are displayed correctly.

2. The fallback expression "%QUERY{"'%web%.%topic%'/attachments[name=~'\.(gif|png|jpe?g)'][0].name"}%" does not work. In my installation, the result of the expression is the string "name". This explains the strange error message "can't find name at ...". I don't understand what is wrong with this expression.

Is there another plugin besides PersonalInfoAddon that is more compatible with MetaCommentPlugin? Do these problems occur because I use PatternSkin instead of NatSkin?

-- ChristianDHeureuse - 07 Sep 2011

QuestionForm edit

Subject Using an extension
Extension MetaCommentPlugin
Version Foswiki 1.1.3
Status Asked
Related Topics
Topic revision: r2 - 08 Sep 2011, ChristianDHeureuse - This page was cached on 17 Aug 2018 - 10:47.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy