Error with kinetic an 1.7 rc3

Found a bug? Tell us!!
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Error with kinetic an 1.7 rc3

Post 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.
=Don=
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Error with kinetic an 1.7 rc3

Post 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?
=Don=
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Error with kinetic an 1.7 rc3

Post 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.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Error with kinetic an 1.7 rc3

Post 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.
=Don=
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Error with kinetic an 1.7 rc3

Post 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;
}
=Don=
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Error with kinetic an 1.7 rc3

Post 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...
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Error with kinetic an 1.7 rc3

Post 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.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Error with kinetic an 1.7 rc3

Post by Don Chambers »

A template options that is a select? Why did you bold "5"?
=Don=
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Error with kinetic an 1.7 rc3

Post by Timbalu »

Yes. The fifth property is $config_names (please read again after 'in special').
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Error with kinetic an 1.7 rc3

Post 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') {
=Don=
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Error with kinetic an 1.7 rc3

Post by Timbalu »

Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Error with kinetic an 1.7 rc3

Post 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?
=Don=
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Error with kinetic an 1.7 rc3

Post 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.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Error with kinetic an 1.7 rc3

Post 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.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Error with kinetic an 1.7 rc3

Post by Don Chambers »

I have not forgotten - I just discovered a static page problem, which I will start a new thread for.
=Don=
Post Reply