Piwigo Bugtracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001567Piwigonavigationpublic2010.04.03 19:182010.04.14 17:06
Reportergrum 
Assigned Tonikrou 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version2.1.0RC2 
Target Version2.1.0RC3Fixed in Version2.1.0RC2 
Summary0001567: Navigation in calendar mode is broken
Descriptionin the template "month_calendar.tpl", values for {$bar.previous} and {$bar.next} are not correct.

Exemple : if we are looking the month "may 2007"
http://my_url/index.php?/categories/created-monthly-calendar-2007-5 [^]

we expect to have :
 - previous
   text : "April 2007"
   url : http://my_url/index.php?/categories/created-monthly-calendar-2007-4 [^]
 - next :
   text : "June 2007"
   url : http://my_url/index.php?/categories/created-monthly-calendar-2007-6 [^]

Actually, we have :
 - previous
   text : "20"
   url : http://my_url/index.php?/categories/created-monthly-calendar-20 [^]
 - next : is empty
Steps To Reproducejust try to navigate with calendar
Additional Informationthe problem occurs in :
 - monthly view
 - daily view
TagsNo tags attached.
browserany
Database engine and version
PHP version
Web serverApache 1.3.x
Attached Files

- Relationships

-  Notes
(0003699)
plg (manager)
2010.04.07 13:09

I have no photos on may 2007, so I've tried with april 2007 ;-)

previous : "March 2007" index.php?/categories/created-monthly-calendar-2007-3
next : "September 2007" index.php?/categories/created-monthly-calendar-2007-9

=> I don't reproduce the problem.

Note: "previous" of a month is not the preceding month in the calendar, it is the first month with photos inside. this is why my "next" for April 2007 is "September 2007" and not "May 2007".

Are you using MySQL?
Are you using the *.tpl files from "default" theme?
(0003703)
grum (administrator)
2010.04.07 20:42

using MySQL 4.1.22

this functionality works very well on a piwigo 2.0 gallery on the same server with the same services (MySQL, PHP)
(0003720)
plg (manager)
2010.04.08 21:35

grum, MySQL 5.0 is a pre-requisite since Piwigo 2.0 (even if the code was still saying MySQL 4.1 was OK). Can you test with MySQL 5.0 ?
(0003736)
grum (administrator)
2010.04.10 12:05

I found the origin of the problem.
It's because I use PHP 4.1 and because an SQL query has changed.

In the 'calendar_base.class.php' file, on line 285, the function 'pwg_db_cast_to_text' is used, giving a query like :
SELECT CONCAT_WS('-',cast(YEAR(date_creation) as char), cast(MONTH(date_creation) as char)) AS period [...]

The CAST() function don't work very well with PHP 4.1
The same query works :
 - if the CAST() is removed
   SELECT CONCAT_WS('-', YEAR(date_creation), MONTH(date_creation)) AS period [...]

 - if the number of char is defined
   SELECT CONCAT_WS('-',cast(YEAR(date_creation) as char(4)), cast(MONTH(date_creation) as char(2))) AS period [...]
(0003737)
grum (administrator)
2010.04.10 12:08

With Piwigo 2.0, it works with MySQL 4.1 because there is no CAST

1/ if we keep the CAST function, we have to says cleary "Piwigo need MySQL 5.0"
2/ if we want to keep a compatibility with MySQL 4.1, we have to remove the CAST
(0003748)
grum (administrator)
2010.04.10 20:53

I have upgraded my server to MySQL 5.0, there is no problem anymore
(0003749)
svn (reporter)
2010.04.10 21:52

[Subversion] r5782 by nikrou on trunk

-----[Subversion commit log]----------------------------------------------------
Bug 1567 fixed : problem with old version of mysql
required version is now 5.0.0
move required version to functions database specific file like others engines

- Issue History
Date Modified Username Field Change
2010.04.03 19:18 grum New Issue
2010.04.03 19:18 grum browser => any
2010.04.03 19:18 grum Web server => Apache 1.3.x
2010.04.06 22:58 nikrou Status new => assigned
2010.04.06 22:58 nikrou Assigned To => nikrou
2010.04.07 13:09 plg Note Added: 0003699
2010.04.07 20:42 grum Note Added: 0003703
2010.04.08 21:35 plg Note Added: 0003720
2010.04.08 21:36 plg Target Version => 2.1.0RC3
2010.04.10 12:05 grum Note Added: 0003736
2010.04.10 12:08 grum Note Added: 0003737
2010.04.10 20:53 grum Note Added: 0003748
2010.04.10 21:52 svn Checkin
2010.04.10 21:52 svn Note Added: 0003749
2010.04.10 21:52 nikrou Status assigned => resolved
2010.04.10 21:52 nikrou Resolution open => fixed
2010.04.14 17:06 plg Status resolved => closed
2010.04.14 17:06 plg Fixed in Version => 2.1.0RC2


Copyright © 2000 - 2015 MantisBT Team
Contact
Powered by Mantis Bugtracker