[ic] Flypage, multiple product tables, and [item-field]

Kevin Walsh interchange-users@interchange.redhat.com
Fri Oct 26 21:50:01 2001


> When I enter a URL with a valid code in my browser, I get the correct page
> with the correct template.  This part works great no matter which table is
> being accessed or which template is being used.  However, only the first
> [item-field fieldname] tag is displaying any data.  None of the other
> [item-field...] tags are resulting in any data from the database.  I can
> change the field that is being accessed in the first tag and can
> successfully display any field in the database as long as it is the first
> [item-field...] tag.  The other [item-field...] tags in the template are
> ignored completely (not entirely true, they are apparently interpolated to
> some extent because they have been removed in the resulting HTML page).
> This behavior is the same no matter which template is being used, which
> table is being accessed, or which fields are set to be displayed.
>
> If I remove either of the tables from the ProductFiles directive, everything
> works great and all fields are displayed.  It does not matter which
> "product" table is specified as long as there is only one.
>
> If I use [item-data db field] instead of [item-field field] then everything
> works fine, even if multiple tables are listed as ProductFiles.  The
> downsides of this include the need to create a template for each product
> table and that the name of the database gets mixed up in the design of the
> page instead of being abstracted.
> The problem appears to be in Interpolate.pm
>
The fly_page() sub correctly works out the table to use and stores
the name in the $base variable.  This variable would have to be
passed to the labeled_list() sub, on to the iterate_array_list() sub
and, in turn, to the various subs that control the [PREFIX-field],
[PREFIX-description] and [PREFIX-price] tags etc.

Until this is done, you will have to make do with your workaround,
and use the [PREFIX-data] tag.  As you only have two tables, the
duplication will not be as bad as it first appears, and could be
consolidated back at a later date.

I would suggest raising this as an issue on the bugzilla system,
where due attention will be given.

-- 
   _/   _/  _/_/_/_/  _/    _/  _/_/_/  _/    _/
  _/_/_/   _/_/      _/    _/    _/    _/_/  _/   K e v i n   W a l s h
 _/ _/    _/          _/ _/     _/    _/  _/_/    kevin@cursor.uk.com
_/   _/  _/_/_/_/      _/    _/_/_/  _/    _/