Invalid argument supplied for foreach (themes and spartacus)

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
rx scabin

Invalid argument supplied for foreach (themes and spartacus)

Post by rx scabin »

When I access the manage styles item in the menu, I get this
Warning: Invalid argument supplied for foreach() in /home/xopc29a/public_html/313/serendipity/plugins/serendipity_event_spartacus/serendipity_event_spartacus.php on line 603
Is it a bad thing?

I am still able to manage the styles ok (blix and a couple others are a problem) but the first entry in the list of styles is blank. Is it me or something else?

I am running Serendipity 0.9 and PHP 4.4.1

Thank you very much
GaVinci
Regular
Posts: 11
Joined: Tue Jan 31, 2006 8:01 am

Post by GaVinci »

I am having the same issue today. except I get
Warning: Invalid argument supplied for foreach() in /home/gjvath/domains/gavinci.net/public_html/GaVinciwritings/plugins/serendipity_event_spartacus/serendipity_event_spartacus.php on line 604
in my personal 0.9 blog, and then this one
Warning: Invalid argument supplied for foreach() in /home/gjvath/domains/theverburgts.com/public_html/serendipity/plugins/serendipity_event_spartacus/serendipity_event_spartacus.php on line 590
in my fresh install of 1.0 Beta1 on my sisters site.

what gives??
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

When spartacus tells you "Fetching XML File..." which URL does it mention there?

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/
GaVinci
Regular
Posts: 11
Joined: Tue Jan 31, 2006 8:01 am

Post by GaVinci »

Garvin, this is the Fetch message form spartacus....
Trying to open URL package_template.xml...
Fetched 57776 bytes from already existing file on your server. Saving file as /home/gjvath/domains/gavinci.net/public_html/GaVinciwritings/templates_c/package_template.xml...
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Can you see if the "package_template.xml" points to a URL? There should be a URL to netmirror or SF.Net somewhere, at least in s9y 0.9.1 or 1.0-beta1.

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/
GaVinci
Regular
Posts: 11
Joined: Tue Jan 31, 2006 8:01 am

Post by GaVinci »

judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

Is that really the URL? With the http:// stuck in the middle? Or is it pointing to netmirror?

The first would be a problem. The second is just a typo.
Judebert
---
Website | Wishlist | PayPal
GaVinci
Regular
Posts: 11
Joined: Tue Jan 31, 2006 8:01 am

Post by GaVinci »

http://netmirror.org/mirror/serendipity ... mplate.xml

thats the correct url... sorry bout that.. was in a hurry earlier
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

Garvin, the XML is ill-formed because the Joshua-nino template includes a file with an XML reserved character: index.tpl.l&r

Unfortunately, SourceForge CVS is down, or I'd remove it myself. Then again, maybe that's a bit too quick. Is it really required?
Judebert
---
Website | Wishlist | PayPal
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Judebert! Great, thanks a lot for that. I removed that file and renamed it.

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 & Jude

am I right in assuming I shouldn't have used the ampersand in the file name?

Dave
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi Dave!

Yes, that'S right. Special characters like "?", "&", " " should be avoided. But it was also my mistake I didn't spot that.

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/
GaVinci
Regular
Posts: 11
Joined: Tue Jan 31, 2006 8:01 am

Post by GaVinci »

hey all... I hate to say it, but I still get the error....
but I did find what Judebert was talking about, but the .xml file that spartacus pulls, still has this for Joshua-nino

Code: Select all

<file>index.tpl</file>
<file>index.tpl.l&r</file>
lines 1036 and 1037
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

It often requires 24 hours or so for the mirror sites to regenerate their XML. Check again tomorrow, or you could download the theme you want directly from its author.
Judebert
---
Website | Wishlist | PayPal
Post Reply