BlackCatDevelopment / BlackCatCMS

BlackCat CMS is a PHP5, HTML5 content management system
https://blackcat-cms.org
Other
11 stars 9 forks source link

Dates aren't shown after Update #259

Closed instantflorian closed 10 years ago

instantflorian commented 10 years ago

In Backend & Frontend view date placeholders appear instead of values. I'm quite sure this did not happen in 1.0.3 2014-08-28_170941 2014-08-28_171023

webbird commented 10 years ago

Have you tried to re-set the date preferences?

instantflorian commented 10 years ago

Ah, That and logging off/logging on did the trick. Thank you.

webbird commented 10 years ago

Well, that's a workaround, but it's still a bug.

webbird commented 10 years ago

This happens if a user has no settings yet. Cause it that initialize.php sets the key twice:

REGISTER -CAT_DEFAULT_DATE_FORMAT- -%d.%m.%Y-
REGISTER -CAT_DEFAULT_DATE_FORMAT- -d.m.Y-

Second is the old default date format for WB and LEPTON. I don't know why this happens yet.

webbird commented 10 years ago

I'm really confused, it seems to be a problem not in BC, but with the mysql_* methods used. There are two keys with similar names:

DEFAULT_DATE_FORMAT
CAT_DEFAULT_DATE_FORMAT

The CAT* is found first (as sort order is by name), so fetchRow() returns the correct values. But in the next iteration, the OTHER value is retrieved, though the key ist without CAT*

???

webbird commented 10 years ago

At least, I found that I was looking into the wrong DB. oops In fact, the key is set twice in the settings table, which is caused by an error in the upgrade.php.