Fatal Error

Skinning and designing Serendipity (CSS, HTML, Smarty)
Post Reply
d_cee
Regular
Posts: 603
Joined: Wed Jan 18, 2006 6:32 pm
Location: UK
Contact:

Fatal Error

Post 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
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Fatal Error

Post by garvinhicking »

Hi!

Does the same error not happen with other themes?

How does your config.inc.php look like?

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
d_cee
Regular
Posts: 603
Joined: Wed Jan 18, 2006 6:32 pm
Location: UK
Contact:

Post 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
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
d_cee
Regular
Posts: 603
Joined: Wed Jan 18, 2006 6:32 pm
Location: UK
Contact:

Post 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
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
d_cee
Regular
Posts: 603
Joined: Wed Jan 18, 2006 6:32 pm
Location: UK
Contact:

Post 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
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
carl_galloway
Regular
Posts: 1331
Joined: Sun Dec 04, 2005 5:43 pm
Location: Andalucia, Spain
Contact:

Post 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?
d_cee
Regular
Posts: 603
Joined: Wed Jan 18, 2006 6:32 pm
Location: UK
Contact:

Post 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
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post 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.
Judebert
---
Website | Wishlist | PayPal
carl_galloway
Regular
Posts: 1331
Joined: Sun Dec 04, 2005 5:43 pm
Location: Andalucia, Spain
Contact:

Post by carl_galloway »

oh jude, sigh...
Post Reply