Page 1 of 1

Fatal Error

Posted: Tue Aug 01, 2006 6:06 pm
by d_cee
Hi there

I've been working on a new 1.1 configurable theme. It worked fine until I added the configurable options to the index.tpl and the config.inc.php. The frontpage is still OK but now if I click on an entry I get:

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 20943 bytes) in /var/www/vhosts/mydomain/subdomains/mysubdomain/httpdocs/include/functions_comments.inc.php on line 211

I'm using Serendipity 1.1-alpha7

Any help gratefully received
thanks

Dave

Re: Fatal Error

Posted: Tue Aug 01, 2006 8:28 pm
by garvinhicking
Hi!

Does the same error not happen with other themes?

How does your config.inc.php look like?

Best regards,
Garvin

Posted: Tue Aug 01, 2006 8:40 pm
by d_cee
Hi Garvin

all the other themes work fine

my config.inc.php

Code: Select all

<?php # $Id: config.inc.php 108 2005-05-19 08:40:00Z garvinhicking $

$probelang = dirname(__FILE__) . '/lang_' . $serendipity['lang'] . '.inc.php';
if (file_exists($probelang)) {
    include $probelang;
} else {
    include dirname(__FILE__) . '/lang_en.inc.php';
}
$template_config = array(
 /*   array(
        'var'           => 'colorset',
        'title'         => 'Color Set',
        'description'   => 'Enter the color set you want to use for this site',
        'type'          => 'select',
        'default'       => 'blue',
        'select_values' => array('blue' => 'Blue', 'pink' => 'Pink', 'maroon' => 'Maroon', 'green' => 'Green', 'nuclear' => 'Nuclear')
    ),*/
    array(
        'var'           => 'navlink1text',
        'title'         => 'Navlink #1 Text',
        'description'   => 'Enter the first navigation text',
        'type'          => 'string',
        'default'       => 'About',
    ),
    array(
        'var'           => 'navlink1url',
        'title'         => 'Navlink #1 URL',
        'description'   => 'Enter the first navigation URL eg \'http://www.somesite.url\'',
        'type'          => 'string',
        'default'       => '#',
    ),
    array(
        'var'           => 'navlink2text',
        'title'         => 'Navlink #2 Text',
        'description'   => 'Enter the second navigation text',
        'type'          => 'string',
        'default'       => 'Photos',
    ),
    array(
        'var'           => 'navlink2url',
        'title'         => 'Navlink #2 URL',
        'description'   => 'Enter the second navigation URL eg \'http://www.somesite.url\'',
        'type'          => 'string',
        'default'       => '#',
    ),
    array(
        'var'           => 'navlink3text',
        'title'         => 'Navlink #3 Text',
        'description'   => 'Enter the third navigation text',
        'type'          => 'string',
        'default'       => 'Dave's themes',
    ),
    array(
        'var'           => 'navlink3url',
        'title'         => 'Navlink #3 URL',
        'description'   => 'Enter the third navigation URL eg \'http://www.somesite.url\'',
        'type'          => 'string',
        'default'       => 'http://themes.daves.me.uk',
    ),
    array(
        'var'           => 'navlink4text',
        'title'         => 'Navlink #4 Text',
        'description'   => 'Enter the fourth navigation text',
        'type'          => 'string',
        'default'       => 'Contact',
    ),
    array(
        'var'           => 'navlink4url',
        'title'         => 'Navlink #4 URL',
        'description'   => 'Enter the fourth navigation URL eg \'http://www.somesite.url\'',
        'type'          => 'string',
        'default'       => '#',
    ),
);
?>
thanks

Dave

Posted: Tue Aug 01, 2006 8:41 pm
by garvinhicking
Hi!

That is really wicked. Does the error go away if you remove the config.inc.php file?

If yes, can you try if it goes away by removing the first lines up to where it starts with $template_config ?

I'd love to fix this :)

Best regards,
Garvin

Posted: Tue Aug 01, 2006 9:31 pm
by d_cee
Hi Garvin
the error does go away when I remove the config.inc.php file.

I thought I might have commented out the first section incorrectly

Code: Select all

$template_config = array(
 /*   array(
        'var'           => 'colorset',
        'title'         => 'Color Set',
        'description'   => 'Enter the color set you want to use for this site',
        'type'          => 'select',
        'default'       => 'blue',
        'select_values' => array('blue' => 'Blue', 'pink' => 'Pink', 'maroon' => 'Maroon', 'green' => 'Green', 'nuclear' => 'Nuclear')
    ),*/
so I tried deleting it so my config.inc.php would look like this

Code: Select all

$template_config = array(
        'var'           => 'navlink1text',
        'title'         => 'Navlink #1 Text',
        'description'   => 'Enter the first navigation text',
        'type'          => 'string',
        'default'       => 'About',
    ),
but then I just got a blank page.

so I tried

Code: Select all

$template_config = array(
	array(
        'var'           => 'navlink1text',
        'title'         => 'Navlink #1 Text',
        'description'   => 'Enter the first navigation text',
        'type'          => 'string',
        'default'       => 'About',
    ),
and the error came back

I also tried having deleted

Code: Select all

$probelang = dirname(__FILE__) . '/lang_' . $serendipity['lang'] . '.inc.php';
if (file_exists($probelang)) {
    include $probelang;
} else {
    include dirname(__FILE__) . '/lang_en.inc.php';
}
but it made no difference

cheers
Dave

Posted: Tue Aug 01, 2006 9:58 pm
by garvinhicking
Hi!

What happens if you just enter an empty config.inc.php file, do you get that error?

And what happens if you use this content:

Code: Select all

<?php
$template_config = array(
	array(
        'var'           => 'temp',
        'title'         => 'Navlink #1 Text',
        'description'   => 'Enter the first navigation text',
        'type'          => 'string',
        'default'       => 'TEST',
    );
?

Best regards,
Garvin

Posted: Tue Aug 01, 2006 11:34 pm
by d_cee
Hi Garvin
garvinhicking wrote:What happens if you just enter an empty config.inc.php file, do you get that error?
The title links work fine
And what happens if you use this content:

Code: Select all

<?php
$template_config = array(
	array(
        'var'           => 'temp',
        'title'         => 'Navlink #1 Text',
        'description'   => 'Enter the first navigation text',
        'type'          => 'string',
        'default'       => 'TEST',
    );
I just get a blank window - don't even see the front page

cheers

Dave

Posted: Wed Aug 02, 2006 9:42 am
by garvinhicking
Hi!

Hm. I'm a bit at a loss. Could you mail me your template, then I'll try to check that on my install?

Best regards,
Garvin

Posted: Wed Aug 02, 2006 7:59 pm
by carl_galloway
dave is it possible you're using a version of 1.1 form several weeks ago, Garvin do you remember we had those problems because the theme configurator was still in early testing and you have disabled parts. Might be useful if dave lets you know what version of 1.1 he downloaded?

Posted: Thu Aug 03, 2006 9:37 am
by d_cee
Hi Carl

It's 1.1 alpha 7 which I only installed last weekend as an update to alpha 1
so I guess it's the latest version.

Dave

Posted: Thu Aug 03, 2006 2:40 pm
by garvinhicking
Hi!

This was a bug of s9y 1.1-alpha7, which I was able to fix thanks to some more help by David.

It happened, when you had not yet saved your template options, and thus s9y would return an empty template option set, which would then disturb the rest of the serendipity page flows!

Best regards,
Garvin

Posted: Thu Aug 03, 2006 4:40 pm
by judebert
Oh, my. That gave me a chuckle. I'm sorry, and I don't mean to offend anyone, but the back-to-back "I'm using alpha-7" and "That's a bug from alpha-7" just kicks me in the pants. The utter futility...

Dave, I'm sorry this had to happen to you. I'm glad it's something that already been found and fixed, though.

Posted: Thu Aug 03, 2006 7:57 pm
by carl_galloway
oh jude, sigh...