[pmwiki-users] table problem after update

Petko Yotov 5ko at 5ko.fr
Sat Aug 26 08:12:19 PDT 2023


On 26/08/2023 16:54, Jabba Laci wrote:
> I had to update my homepage to the latest pmwiki version. The
> migration went well except one little thing.
> 
> In the old version I had tables like this:
> 
> %rframe bgcolor=lightblue%Attach:face.jpg"@hello"
> ||'''Name'''           ||Myself
> ||'''Age'''            ||20
> 
> Here, the table appeared on the left side and the image appeared on
> the right. They were next to one another.
> 
> However, the new pmwiki renders it differently. The image is still on
> the right side, but the table appears _below_ it on the left side, not
> next to it.

I suspect there is a <table width='100%'> tag in the HTML so the table 
is actually 100% wide and thus drops below the picture.

I think a "||" table definition is missing at the start of the table, it 
should probably look like this:

   %rframe bgcolor=lightblue%Attach:face.jpg"@hello"
   ||
   ||'''Name''' ||Myself
   ||'''Age'''  ||20

When you don't have a table definition like "||", or "|| border=1 
class=simpletable", PmWiki will reuse a previous table definition from 
the same page, or from an included page, or a borderless table that is 
100% wide.

PmWiki hasn't changed this behaviour for years. Is it possible you had a 
table near the top of the page that included a "||" definition, and you 
removed that table?

For historical reasons, because many wikis may rely on this behaviour, 
we don't currently have plans to change it in the core installation. But 
as it may appear counter-intuitive, in the documentation we strongly 
recommend people to always write the initial "||" table definition for 
every table:

   https://www.pmwiki.org/wiki/PmWiki/Tables

Petko



More information about the pmwiki-users mailing list