FrameWikistyle


This test page demonstrates how the use of <span> tag instead of <div> tags for creating floating frames (in wikistyles.php) displays them incorrectly in some browsers (like Google Chrome).

The issue has been reported at http://pmwiki.org/wiki/PITS/01160


The list of pages (Test.Fr*) here is created using

 %rframe%(:PageList group=Test name=Fr* fmt=#simple list=normal:)

It shows up in a frame placed on the right of the page in Firefox and IE, as expected out of the %rframe% wikistyle. However in Google Chrome the list will appear on the left (the region of normal text flow), while a small empty frame will float on the right.


The reason for this is that the above line of code creates a <div> block inside a <span> block. The <span> block is created by "rframe", while the div block is created by "PageList?". Technically it is illegal to create a <div> (a block element) inside a <span> (an inline element). While IE and Firefox fixes this issue, Chrome does not.

Possible solutions:

  1. Create a "div" tag instead of a "span" tag in wikistyles.php - replace "span" with "div style='display:inline;'" (line 95 of wikistyles.php as of PmWiki v 2.2.8).
  2. In config.php add the line $spanTag = 'div style="display:inline;"';
  3. Use >>rframe<< instead of %rframe% in your wiki page, when you need to style blocks of text instead of inline characters. --Petko January 02, 2010, at 04:01 AM

Thanks Petko. I wasn't aware of that.. new to PmWiki. :) You can remove this issue page if you want.

 0: 00.00 00.00 config start
 1: 00.00 00.00 config end
 2: 00.03 00.02 MarkupToHTML begin
 3: 00.04 00.03 ReadApprovedUrls SiteAdmin.ApprovedUrls begin
 4: 00.04 00.03 ReadApprovedUrls SiteAdmin.ApprovedUrls end
 5: 00.04 00.04 FPLTemplate: Chain begin
 6: 00.04 00.04 FPLTemplate: FPLTemplateLoad
 7: 00.04 00.04 FPLTemplate: FPLTemplateDefaults
 8: 00.04 00.04 FPLTemplate: FPLTemplatePageList
 9: 00.04 00.04 MakePageList pre
10: 00.04 00.04 PageListSources begin
11: 00.04 00.04 PageStore::ls begin wiki.d/{$FullName}
12: 00.05 00.04 PageStore::ls merge wiki.d/{$FullName}
13: 00.06 00.05 PageStore::ls end wiki.d/{$FullName}
14: 00.06 00.05 PageStore::ls begin $FarmD/wikilib.d/{$FullName}
15: 00.06 00.05 PageStore::ls merge $FarmD/wikilib.d/{$FullName}
16: 00.06 00.05 PageStore::ls end $FarmD/wikilib.d/{$FullName}
17: 00.06 00.05 PageListSources end count=5
18: 00.06 00.05 PageListSort pre ret=4 order=name
19: 00.06 00.05 MakePageList items count=5, filters=
20: 00.06 00.05 MakePageList post count=5, readc=0
21: 00.06 00.05 PageListSort begin
22: 00.06 00.05 PageListSort sort
23: 00.06 00.05 PageListSort end
24: 00.06 00.05 MakePageList end
25: 00.06 00.05 FPLTemplate: FPLTemplatePmWikiOrg
26: 00.06 00.05 MarkupToHTML begin
27: 00.06 00.05 MarkupToHTML end
28: 00.06 00.05 FPLTemplate: FPLTemplateSliceList
29: 00.06 00.05 FPLTemplate: FPLTemplateFormat
30: 00.06 00.05 MarkupToHTML begin
31: 00.06 00.05 MarkupToHTML end
32: 00.06 00.05 FPLTemplate: FPLTemplatePmWikiOrgPostFormat
33: 00.06 00.05 FPLTemplate: Chain end
34: 00.07 00.06 MarkupToHTML end
35: 00.07 00.06 MarkupToHTML begin
36: 00.08 00.07 MarkupToHTML end
37: 00.08 00.07 MarkupToHTML begin
38: 00.09 00.08 MarkupToHTML end
39: 00.09 00.08 now
Peak memory: 4,798,984 bytes