error in tables: problems with rowspan

If you found an error, please report it here.

error in tables: problems with rowspan

Postby Kjety » 13 Aug 2009 22:51

Hello,

I experience bigger layout errors in the tables where there is rowspanning involved.


Image

The rowspan definition is nested into the class definition and the number of spanned cells seems also wrong:

<table class="datatable">
<tbody><tr>
<th class="header_wrap layout_text" colspan="2">24 records</th>
<th class="header_wrap layout_visitors">Unique visitors</th>
<th class="header_wrap layout_visits">Number of visits</th>
<th class="header_wrap layout_pages">Pages</th>
<th class="header_wrap layout_hits">Hits</th>
<th class="header_wrap layout_bytes">Bandwidth</th>
</tr>
<tr class="oddyear">
<td class="layout_text" rowspan="1">2007</td>
<td class="layout_text" rowspan="1">Aug</td>
<td class="layout_visitors">14'774</td>
<td class="layout_visits">22'380</td>
<td class="layout_pages">352'798</td>
<td class="layout_hits">1'156'484</td>
<td class="layout_bytes">25.87 GB</td>
</tr>
<tr class="rowspan=" 2="">
<td class="layout_text" rowspan="1">Sep</td>
<td class="layout_visitors">15'096</td>
<td class="layout_visits">24'183</td>
<td class="layout_pages">353'043</td>
<td class="layout_hits">1'163'100</td>
<td class="layout_bytes">24.70 GB</td>
</tr>
<tr class="rowspan=" 3="">
<td class="layout_text" rowspan="1">Oct</td>
<td class="layout_visitors">16'199</td>
<td class="layout_visits">25'430</td>
<td class="layout_pages">379'349</td>
<td class="layout_hits">1'249'251</td>
<td class="layout_bytes">28.64 GB</td>
</tr>
<tr class="rowspan=" 4="">
<td class="layout_text" rowspan="1">Nov</td>
<td class="layout_visitors">16'514</td>
<td class="layout_visits">26'067</td>
<td class="layout_pages">433'937</td>
<td class="layout_hits">1'425'385</td>
<td class="layout_bytes">31.06 GB</td>
</tr>
<tr class="rowspan=" 5="">
<td class="layout_text" rowspan="1">Dec</td>
<td class="layout_visitors">14'392</td>
<td class="layout_visits">22'040</td>
<td class="layout_pages">341'898</td>
<td class="layout_hits">1'157'190</td>
<td class="layout_bytes">28.74 GB</td>
</tr>
<tr class="evenyear">
<td class="layout_text" rowspan="1">2008</td>
<td class="layout_text" rowspan="1">Jan</td>
<td class="layout_visitors">17'507</td>
<td class="layout_visits">27'637</td>
<td class="layout_pages">472'873</td>
<td class="layout_hits">1'480'364</td>
<td class="layout_bytes">40.70 GB</td>
</tr>
<tr class="rowspan=" 2="">
<td class="layout_text" rowspan="1">Feb</td>
<td class="layout_visitors">17'064</td>
<td class="layout_visits">26'018</td>
<td class="layout_pages">436'863</td>
<td class="layout_hits">1'395'827</td>
<td class="layout_bytes">37.28 GB</td>
</tr>
<tr class="rowspan=" 3="">
<td class="layout_text" rowspan="1">Mar</td>
<td class="layout_visitors">18'697</td>
<td class="layout_visits">30'259</td>
<td class="layout_pages">441'903</td>
<td class="layout_hits">1'427'722</td>
<td class="layout_bytes">37.52 GB</td>
</tr>
<tr class="rowspan=" 4="">
<td class="layout_text" rowspan="1">Apr</td>
<td class="layout_visitors">17'522</td>
<td class="layout_visits">26'814</td>
<td class="layout_pages">451'024</td>
<td class="layout_hits">1'421'714</td>
<td class="layout_bytes">40.63 GB</td>
</tr>
<tr class="rowspan=" 5="">
<td class="layout_text" rowspan="1">May</td>
<td class="layout_visitors">17'127</td>
<td class="layout_visits">26'534</td>
<td class="layout_pages">408'093</td>
<td class="layout_hits">1'321'848</td>
<td class="layout_bytes">38.70 GB</td>
</tr>
<tr class="rowspan=" 6="">
<td class="layout_text" rowspan="1">Jun</td>
<td class="layout_visitors">17'937</td>
<td class="layout_visits">28'264</td>
<td class="layout_pages">409'333</td>
<td class="layout_hits">1'319'118</td>
<td class="layout_bytes">49.62 GB</td>
</tr>
<tr class="rowspan=" 7="">
<td class="layout_text" rowspan="1">Jul</td>
<td class="layout_visitors">17'243</td>
<td class="layout_visits">28'756</td>
<td class="layout_pages">425'981</td>
<td class="layout_hits">1'334'244</td>
<td class="layout_bytes">39.61 GB</td>
</tr>
<tr class="rowspan=" 8="">
<td class="layout_text" rowspan="1">Aug</td>
<td class="layout_visitors">16'394</td>
<td class="layout_visits">24'963</td>
<td class="layout_pages">369'194</td>
<td class="layout_hits">1'088'941</td>
<td class="layout_bytes">30.67 GB</td>
</tr>
<tr class="rowspan=" 9="">
<td class="layout_text" rowspan="1">Sep</td>
<td class="layout_visitors">17'797</td>
<td class="layout_visits">27'506</td>
<td class="layout_pages">410'677</td>
<td class="layout_hits">1'221'098</td>
<td class="layout_bytes">33.78 GB</td>
</tr>
<tr class="rowspan=" 10="">
<td class="layout_text" rowspan="1">Oct</td>
<td class="layout_visitors">18'628</td>
<td class="layout_visits">28'920</td>
<td class="layout_pages">437'343</td>
<td class="layout_hits">1'277'635</td>
<td class="layout_bytes">36.15 GB</td>
</tr>
<tr class="rowspan=" 11="">
<td class="layout_text" rowspan="1">Nov</td>
<td class="layout_visitors">17'551</td>
<td class="layout_visits">27'229</td>
<td class="layout_pages">402'064</td>
<td class="layout_hits">1'167'540</td>
<td class="layout_bytes">32.35 GB</td>
</tr>
<tr class="rowspan=" 12="">
<td class="layout_text" rowspan="1">Dec</td>
<td class="layout_visitors">16'430</td>
<td class="layout_visits">25'053</td>
<td class="layout_pages">393'081</td>
<td class="layout_hits">1'258'843</td>
<td class="layout_bytes">43.71 GB</td>
</tr>
etc.



Another example is the File type section:
Image


I haven't found any comment on this behaviour, strange. What could be the problem here?

Thanks in advance,
Ralf
Kjety
 
Posts: 4
Joined: 13 Aug 2009 22:05

Re: error in tables: problems with rowspan

Postby Oliver » 13 Aug 2009 23:01

this is strange. I never have seen this before.

you are also missing further "rowspans" at the year numbers in the first table.

I would suggest that you re-download the files. I highly assume your files are damaged or you do not have the latest version.

Oliver
Oliver
BetterAWStats Creator/Admin
User avatar
Oliver
Site Admin
 
Posts: 139
Joined: 10 Mar 2008 19:09

Re: error in tables: problems with rowspan

Postby Kjety » 14 Aug 2009 18:02

Hi Oliver,

There is only a 1.0 ZIP .. I downloaded it again, made the two patches in display_helpers.php ($finaltime) and library.inc.php (layout_date) and updated the config.php.

Just to be sure some questions:
My server is http:/ /www.server.de and the apache root is under /var/www/
awstats + data is installed under /var/www/cgi-bin/awstats and the common things as css,icons under /var/www/awstats
As betterawstats did not run from /var/www/cgi-bin I put it under /var/www/pub/betterawstats

In the config.php I say the following. Is that correct?
site_url = http://www.server.de/pub/betterawstats
site_path = /var/www/pub/betterawstats
path_data = /var/www/cgi-bin/awstats
path_lib(lang) = /var/www/cgi-bin/awstats/lib(lang)
icons_url = http://www.server.de/awstats/

I receive an error message that GD2 is not installed, so I said show map = 'false' in Besucher-Domains
The rowspan problem cannot be caused by a missing GD2, can it?
Shit - I don't get it working ..

Gruß Ralf
Kjety
 
Posts: 4
Joined: 13 Aug 2009 22:05

Re: error in tables: problems with rowspan

Postby Oliver » 14 Aug 2009 18:11

very strange. Anyhow the settings should not influence that stuff.

you see below in the code, the rowspan is inserted via code in the file /modules/render_table.inc.php when there are two description fields above each other that have the same content.:

Code: Select all
if (isset($table[$lastlineid][$cell_no]) && $cell === $table[$lastlineid][$cell_no]) {
                    $rowspan[$lineid][$cell_no] = $rowspan[$lastlineid][$cell_no] + 1;
                    $search = " rowspan=\"{$rowspan[$lastlineid][$cell_no]}\">$cell_str</td>";
                    $replace = " rowspan=\"{$rowspan[$lineid][$cell_no]}\">$cell_str</td>";
                    // we search the last time we had this data and replace it
                    $pos = strrpos($out, $search);
                    $out = substr_replace($out, $replace, $pos, strlen($search));
                    $doline = false;
                } else { // no match, restart with 1
                    $rowspan_str = ' rowspan="1"'; // do =1 always so we can replace later
                    $rowspan[$lineid][$cell_no] = 1;
                }


You can compare the code with yours and see if there is a difference. I am wondering if there is a setting in your PHP which is screwing up things... which PHP version do you have?


Oliver
Oliver
BetterAWStats Creator/Admin
User avatar
Oliver
Site Admin
 
Posts: 139
Joined: 10 Mar 2008 19:09

Re: error in tables: problems with rowspan

Postby Kjety » 14 Aug 2009 18:22

PHP 4.4 on a dedicated server @hosteurope.de under Debian
But I don't get that bloddy packetmanager running to check for updates ..

Ralf
Kjety
 
Posts: 4
Joined: 13 Aug 2009 22:05

Re: error in tables: problems with rowspan

Postby Oliver » 14 Aug 2009 19:16

Sorry but the minimum requirement as listed on the download page is PHP 5.2

Oliver
Oliver
BetterAWStats Creator/Admin
User avatar
Oliver
Site Admin
 
Posts: 139
Joined: 10 Mar 2008 19:09

Re: error in tables: problems with rowspan

Postby Kjety » 14 Aug 2009 19:48

Aargh. Sorry. I'll try to update
Kjety
 
Posts: 4
Joined: 13 Aug 2009 22:05

Re: error in tables: problems with rowspan

Postby Oliver » 14 Aug 2009 19:53

good idea. PHP 4 was declared dead in July 2007, 2 years ago...

http://www.google.com/search?name=f&hl=en&q=php+4+end+of+life&sourceid=mozilla-search&start=0
Oliver
BetterAWStats Creator/Admin
User avatar
Oliver
Site Admin
 
Posts: 139
Joined: 10 Mar 2008 19:09


Return to Bug Reports

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest

cron