NOTE: If you are a developer, please use a private wiki based on foswiki/trunk on a daily base ...or use trunk.foswiki.org to view this page for some minimal testing.
Use Item11383 for general documentation changes for release 1.1.5. Use Item9693 for docu changes for release 2.0.

Item1587: INCLUDE and INCLUDINGTOPIC directives are handled in a wrong way

Priority: CurrentState: AppliesTo: Component: WaitingFor:
Normal Being Worked On Extension ImageGalleryPlugin Main.ItaloValcy

Description

INCLUDE

Including (INCLUDE{}) a topic which features an Image gallery and accessing the gallery by clicking on a thumbnail will push you to the included topic. This behavior is not transparent for the user since he doesn't even know (without viewing the raw view), that the image gallery originates from another topic.

INCLUDINGTOPIC

Imagine:
We want to have image galleries for many topics, featuring only the pictures of these very topics and we want the galleries to be modifiable by just editing one topic which is included into all other topics.

Lets say:
  • TopicA is the one which has images attached and which INCLUDEs...
  • ... TopicB, where the image gallery is defined

So TopicA looks like that:
[...]
%INCLUDE{TopicB}%
[...]
and TopicB contains:
%STARTINCLUDE%
---+++ Image Gallery
%IMAGEGALLERY{topic="%INCLUDINGTOPIC%"}%
%STOPINCLUDE%

This way, TopicA gets the nice thumbnail gallery of its own pictures. But: Clicking on a picture will -- like mentioned above -- kick you to the included topic TopicB, where of course the image you wanted to access can't be found.

Even more weird is:
If there is an image attached to the included topic TopicB, then this one will be shown in the thumbnail gallery of the INCLUDINGTOPIC TopicA rather than the images attached to the latter!

Nobody interested? Item1813 might be related...

-- PhilippLeufke - 08 Jul 2009

You probably have to set your own format and fiddle with $name and $(image|thumb|orig)url. Did you already tried this?

-- OliverKrueger - 08 Jul 2009

Just tried it.
  1. What's a little bit annoying: the ImageGalleryPlugin? documentation seems to list the wrong default format; i.e. inserting the default format string <a href="$origurl"><img src="$imageurl" title="$comment" width="$width" height="$height"/></a> will not result in the look of the gallery which you get without using format. This needs to be fixed in the documentation. What is the real default string?
  2. With the suggested default format I didn't get the nice slideshow-like view when clicking a thumbnail. This view is accessed with URL parameters which are not adjustable by the user (or am I wrong?). So you will always be pushed to the included topic TopicB.

The more I fiddle around with this, I'm convinced that Item1813 is really related to this issue since both are addressing problems. What needs to be fixed in my eyes (but I'm not an expert) is:
  • the URL for clicking a thumbnail (you know: for accessing the slideshow view with the arrows left/right...) should always be the one of %TOPIC% (or %INCLUDINGTOPIC%) and not %BASETOPIC% (it's probably not coded like that, but the result is the same)
  • the topic="!Item1587" parameter is non-ambiguous in my eyes, it should be handled in the only possible correct way; including images to the gallery which are attached to %!BASETOPIC% is a bug
  • $imageurl and =$thumburl" should be robust against images with same filenames (compare Item 1813. Maybe adding the name of the original topic to the filename will help?!

-- PhilippLeufke - 09 Jul 2009

Bug confirmed. I'll work in it.

-- ItaloValcy - 03 May 2010

ItemTemplate edit

Summary INCLUDE and INCLUDINGTOPIC directives are handled in a wrong way
ReportedBy PhilippLeufke
Codebase
SVN Range Foswiki-1.0.0, Thu, 08 Jan 2009, build 1878
AppliesTo Extension
Component ImageGalleryPlugin
Priority Normal
CurrentState Being Worked On
WaitingFor ItaloValcy
Checkins
TargetRelease n/a
ReleasedIn
Topic revision: r5 - 03 May 2010 - 17:54:09 - ItaloValcy
 
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons LicenseGet Foswiki at sourceforge.net. Fast, secure and Free Open Source software downloads