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

Todd L. Cawthron interchange-users@interchange.redhat.com
Mon Oct 29 11:42:08 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.
>

After I posted this message to the list, I did some more investigating and
then raised the issue on bugzilla.

When I turned on the debugging features in Interchange, I noticed a lot of
database error messages during flypage generation.  The first error that was
returned (which resulted from querying the DescriptionField) started a chain
reaction that tripped up the rest of the flypage process on the database
side.  I added a line of code to DBI.pm on my system that fixed this
problem.  However, I can't guarantee at this point that my "fix" didn't
break something else!

If you are interested in the details, query bug #342 on bugzilla.


Todd L. Cawthron
todd@lunsfordgroup.com