Page 1 of 1
reload issues
Posted: Sat Feb 09, 2013 12:38 pm
by Timbalu
Maybe this is a better place here to discuss that reloading problem behaviour to get fixed since S9y-1.6. I found these by testing the 1.7 RC versions.
Archiv:
Thread started here
http://board.s9y.org/viewtopic.php?f=10 ... 1&start=30 (german) and followed in comments of
https://github.com/s9y/Serendipity/comm ... 4aee8f07dd (english).
Changing Themes brought up some unwanted behaviours.... on
first page load:
- 1. Theme, particularly Bulletproof, css needed a non-cache css includement... (1)
- 2. Templates showed old $template_config_groups... (1)
- 3. Some more of the global vars were transported to themes not using them... (1)
- 4. The old navigation array rendering does not work any more (except amount)...
(
1) possibly fixed in 2.0.
Copy of my last post, related to 4:
I was quite on this for a few days - but now had this
Code: Select all
Fatal error: Uncaught exception 'ErrorException' with message 'constant(): Couldn't find constant NAV_DEFAULT_4' in ...config.inc.php
on template change. This happens if you change a template - for example (a)xcur (mind the c) - and reset the default amount 4 to 3 - safe it - then change to a new theme andreas09.
Then this bug appears until you reload the page with F5. After that everything is OK again and the new template has arrived!
This is also related to all of these described "keeping old config setting until next reload" "bug" behaviours.
With production true it won't stop to error, but still throws a
Code: Select all
Warning: constant(): Couldn't find constant NAV_DEFAULT_4 in /templates/andreas09/config.inc.php on line 55
Is that still something we want to wait for?
Re: reload issues
Posted: Sat Feb 09, 2013 12:59 pm
by garvinhicking
Hi!
Moved to Development, this is the better place.
[*]3. Some more of the global vars were transported to themes not using them... (1)
IMO its better to transfer all old settings to a new template where they could be used, better than omitting the values and they get lost forever.
The navigation array would need to be changed in the config.inc.phps, to make sure that constants are actually defined() before they use it, to prevent the error you describe...
Best regards,
Garvin
Re: reload issues
Posted: Sat Feb 09, 2013 1:24 pm
by Timbalu
garvinhicking wrote:The navigation array would need to be changed in the config.inc.phps, to make sure that constants are actually defined() before they use it, to prevent the error you describe...
Yes, we could do this for all templates in reach, but not for those being renamed and still in use in the wild. This is the point where it starts to break... (and this relates to all of these reloading issues).
The other thing is, that this old config navigation rendering is not being used any more at all, if you really look into and compare to what is displayed. Please view and try yourself. Just to be clear to any reader: It does
not break having a navigation at all, it does break the default old config settings.
Re: reload issues
Posted: Sun Feb 10, 2013 10:46 am
by mattsches
Is it just me, or
Code: Select all
mattsches@kormoran:/path/to/s9y.local/httpdocs/templates/axcur$ php -l config.inc.php
PHP Parse error: syntax error, unexpected end of file in config.inc.php on line 217
Errors parsing config.inc.php
This prevented me from upgrading to RC4. Locally fixed now.
I tried to reproduce your bug, Timbalu, but am not getting any warning when switching between axcur and andreas09 themes ...
Re: reload issues
Posted: Sun Feb 10, 2013 11:10 am
by Timbalu
Just fixed. Please delete and load new one tomorrow via spartacus.
This file had so many whitespaced lines and the previous cleanup deleted a loop end.
For the other.... did you reset amount in axcur first from 4 to 3?
Re: reload issues
Posted: Sun Feb 10, 2013 11:53 am
by mattsches
Timbalu wrote:For the other.... did you reset amount in axcur first from 4 to 3?
I did, I also tried other (higher) values .. still don't get any errors. Actually, I am not getting any warnings at all. Maybe this is due to my error_reporting level, but I don't have time right now to look into that

Sorry
Re: reload issues
Posted: Sun Feb 10, 2013 3:19 pm
by Timbalu
Strange... I did this with a plain new RC3 install now. Same errors and even one more old category fetch bug to fix in axcur (which I commited to be fixed now).
Did you enable the horizontal menue in both templates?
I have andreas09 with amount 5 (which is the default amount of global nav) here and (a)xcur with 5 or 4 or 3 - changing back to andreas09 brings up this constant error, which is based to this lagged reload issue already described.
Re: reload issues
Posted: Sun Feb 10, 2013 4:44 pm
by Timbalu
Just as a sidenote: commiting some fixes to additional themes, I also disabled two possible doublettes of category creation in (a)xcur and mo3 - does anyone know if they were added twice to the config.inc because of a special reason?
Re: reload issues
Posted: Sun Feb 10, 2013 10:04 pm
by mattsches
Timbalu wrote:Just as a sidenote: commiting some fixes to additional themes, I also disabled two possible doublettes of category creation in (a)xcur and mo3 - does anyone know if they were added twice to the config.inc because of a special reason?
Looks like unintentional copy & paste to me ...
Re: reload issues
Posted: Sun Feb 10, 2013 10:14 pm
by yellowled
Given the slightly messy state of the config.inc.php, I'd guess it's some kind of c & p error.
YL
Re: reload issues
Posted: Sun Feb 10, 2013 10:14 pm
by mattsches
Timbalu wrote:Strange... I did this with a plain new RC3 install now. Same errors and even one more old category fetch bug to fix in axcur (which I commited to be fixed now).
Did you enable the horizontal menue in both templates?
I have andreas09 with amount 5 (which is the default amount of global nav) here and (a)xcur with 5 or 4 or 3 - changing back to andreas09 brings up this constant error, which is based to this lagged reload issue already described.
I've just tried again, cannot reproduce this. I even manually deleted some keys from the s9y_options table - nothing.
From the manual:
constant() Returns the value of the constant, or NULL if the constant is not defined.
So, looks like constant() indeed returns NULL here, but does not emit a warning. Question is, why?
Re: reload issues
Posted: Mon Feb 11, 2013 10:33 am
by Timbalu
Hmm, another try:
1. empty options table
2. chose 2k11 as template
3. allow global nav with default amount 5
4. change to andreas09
==error==
again, I know this could be solved by adding something like is_defined() to these templates, but this would not hit all others templates out there still in use (and the same for all other related errors trying to fix in a templates config.inc).