Page 4 of 5

Re: Error with kinetic an 1.7 rc3

Posted: Wed Mar 20, 2013 6:26 pm
by Don Chambers
Oh sure - NOW you ask me to check this!!! :wink:

I found my own workaround. I did have to create two new {assign} variables (scope='root), but I also eliminated one, so my net gain is only one variable... which I can live with.

I am tracking down one more error, not related to this. Once I have that figured out, I can save a copy of everything, then revert to before these latest changes and try your suggestion. I cannot give you access to this particular server easily, but if necessary, I can try to set up a new one.

Re: Error with kinetic an 1.7 rc3

Posted: Wed Mar 20, 2013 6:47 pm
by Don Chambers
The only remaining problem I am running into is getting a mostly white screen after saving template options. Before I start tracing this problem, has this been encountered before in any other template, and if so, what is the probable cause?

Re: Error with kinetic an 1.7 rc3

Posted: Wed Mar 20, 2013 6:57 pm
by Timbalu
Hmmm, what is a "mostly" white screen?
Did it happen before?
Which previous change forced this behaviour.
Do you have a error.log entry?
What does the sourcecode say?
Is it gone submitting again?
Please polish my magic ball ... (not +s!) ;-)

Yes, we maybe had something similar with bulletproof changing templates (on first change) due to some caching browser css issues. Garvin tried to set a fix for this in 2.0.

Re: Error with kinetic an 1.7 rc3

Posted: Wed Mar 20, 2013 10:08 pm
by Don Chambers
Selecting "Manage Styles" works ok - but when options are saved (which works), the next screen simply shows:

Theme/Style options (kinetic)
Done: The new settings have been saved at 10:45:52

The page source shows:
<p> == TESTING ERROR MODE == </p><pre><br />
<b>Fatal error</b>: Uncaught exception 'ErrorException' with message 'Serendipity error: Invalid argument supplied for foreach()' in /home/content/kinetic-clean/include/compat.inc.php:118
Stack trace:
#0 /home/content/kinetic-clean/include/functions_plugins_admin.inc.php(471): errorToExceptionHandler(Object(template_option), Array, 'kinetic', 'kinetic', Array, true, true, true, true, 'template', Array)
#1 /home/content/kinetic-clean/include/admin/templates.inc.php(119): serendipity_plugin_config()
#2 /home/content/kinetic-clean/serendipity_admin.php(136): include('/home/content/c...')
#3 {main}
thrown in <b>/home/content/kinetic-clean/include/compat.inc.php</b> on line <b>118</b><br />
Line 119 in templates.inc.php is the last line of:

Code: Select all

    serendipity_plugin_config(
        $template_options,
        $template_vars,
        $serendipity['template'],
        $serendipity['template'],
        $template_options->keys,
        true,
        true,
        true,
        true,
        'template',
        $template_config_groups
    );
No error is shown with production=true.

Re: Error with kinetic an 1.7 rc3

Posted: Wed Mar 20, 2013 10:11 pm
by Don Chambers
Looking at bulletproof, why echo this comment?

Code: Select all

function serendipity_plugin_api_event_hook($event, &$bag, &$eventData, $addData = null) {
    global $serendipity;
    
    switch($event) {
        case 'frontend_footer':
            echo '<!--PLUGIN API-->';
    }

    return true;
}

Re: Error with kinetic an 1.7 rc3

Posted: Thu Mar 21, 2013 10:08 am
by Timbalu
Don Chambers wrote:Looking at bulletproof, why echo this comment?
I think this was to seperate partitial source code views into debugging groups...
Nothing essential to have AFAIK. I dimly remember there was a thread about this...

Re: Error with kinetic an 1.7 rc3

Posted: Thu Mar 21, 2013 10:24 am
by Timbalu
Don Chambers wrote: #0 /home/content/kinetic-clean/include/functions_plugins_admin.inc.php(471): errorToExceptionHandler(Object(template_option), Array, 'kinetic', 'kinetic', Array, true, true, true, true, 'template', Array)
#1 /home/content/kinetic-clean/include/admin/templates.inc.php(119): serendipity_plugin_config()
This tells you that one of these serendipity_plugin_config(1, 2, 5, 11) objects or arrays, in special $config_names (a 'select' one), which is the send by $template_options->keys, has either no key or no value to proceed with followup foreach($select AS $select_value => $select_desc) loop.
Now that forces you to debug in detail why this happens.

Re: Error with kinetic an 1.7 rc3

Posted: Thu Mar 21, 2013 1:22 pm
by Don Chambers
A template options that is a select? Why did you bold "5"?

Re: Error with kinetic an 1.7 rc3

Posted: Thu Mar 21, 2013 1:49 pm
by Timbalu
Yes. The fifth property is $config_names (please read again after 'in special').

Re: Error with kinetic an 1.7 rc3

Posted: Thu Mar 21, 2013 4:49 pm
by Don Chambers
Found it. It was another instance of this:

Code: Select all

if ($serendipity['GET']['adminModule'] == 'templates') {
Needing to be this:

Code: Select all

if ($serendipity['GET']['adminModule'] == 'templates' || $serendipity['POST']['adminModule'] == 'templates') {

Re: Error with kinetic an 1.7 rc3

Posted: Thu Mar 21, 2013 5:07 pm
by Timbalu

Re: Error with kinetic an 1.7 rc3

Posted: Thu Mar 21, 2013 5:18 pm
by Don Chambers
Yep - could not find the thread.

By the way, there is a typo there....
Older plugins specifically did not always include the $addData signature. Make sure this exists.
If after installation you get uncircumventable errors, you can make sure to set $serendipity['product'] = true;
I saw that when I installed 1.7.. $serendipity['product'] should be 'production', correct? Or does 'product' also work?

Re: Error with kinetic an 1.7 rc3

Posted: Thu Mar 21, 2013 5:35 pm
by Timbalu
I don't think so!
Thanks! I fixed this here and also in core as this was a copied text from the upgrader notes.

Re: Error with kinetic an 1.7 rc3

Posted: Fri Mar 22, 2013 3:48 pm
by Timbalu
Don Chambers wrote:Oh sure - NOW you ask me to check this!!! :wink:

I found my own workaround. I did have to create two new {assign} variables (scope='root), but I also eliminated one, so my net gain is only one variable... which I can live with.

I am tracking down one more error, not related to this. Once I have that figured out, I can save a copy of everything, then revert to before these latest changes and try your suggestion.
Don, please do not forget to check and test this temporary fix, while I have prepared a patch for this, in case this is used somewhere else too. You could also post your assign solution here, to make this accessible for others.

Re: Error with kinetic an 1.7 rc3

Posted: Fri Mar 22, 2013 4:08 pm
by Don Chambers
I have not forgotten - I just discovered a static page problem, which I will start a new thread for.