some errors with Spartacus plugin

Found a bug? Tell us!!
Dimonius
Regular
Posts: 14
Joined: Fri Jan 20, 2006 1:43 pm

some errors with Spartacus plugin

Post by Dimonius »

So, sometimes ago, there were started something strange things with Spartacus.
For example I started get error messages like "error in foreach() in string 515". And the worst problem - spartacus don`t upgrade plugins. It say, that my plugin is out of date, I click the icon for update, it fetch all needed files, but the version of plugin not change and the next day i see that my plugin version is stil old (previos day version) and Spartacus advise me to update it again. For a long time I think, that it`s problem with conflict in plugins, but today I make the new test instalation of blog with new base, and when I install the Spartacus plugin, i get all errors again.
What am I doing wrong?
----
Serendipity 1.0-beta2
Spartacus 2.5
PHP 4.4.0
MySQL 4.1.18
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

Could you copy the exact errors for me? It's looking like a problem with the cache, but I can't tell for sure.
Judebert
---
Website | Wishlist | PayPal
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

The SF.Net CVS mirror is currently not updating plugin (versions). You'll need to switch to use netmirror.org or wait until the end of the month when SourceForge fixes the problem.

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/
Dimonius
Regular
Posts: 14
Joined: Fri Jan 20, 2006 1:43 pm

Post by Dimonius »

2 judebert
Warning: Invalid argument supplied for foreach() in server/path/here/blog/plugins/serendipity_event_spartacus/serendipity_event_spartacus.php on line 515
in sidebar plugin page this message shows 2 times and in event single

And when i try to upgrade first i get this error message:
Warning: Invalid argument supplied for foreach() in server/path/blog/plugins/serendipity_event_spartacus/serendipity_event_spartacus.php on line 682
then it fetching files and say
Data successfully fetched.
But the version is still old

2 garvinhicking

I change CVS mirror to netmirror.org, but it`s not fix my problems
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

The foreach errors you get can happen if the XML data could not be properly parsed. This can either happen because the XML file is invalid/damaged, or not existing.

Can you check your templates_c directory and look for package*.xml files? See what filesize and -date they have, please.

You can fetch and compare it with the file from here: http://netmirror.org/serendipity/package_event_en.xml
(only download this link, do not view it in your browser, as it would show XML errors there which are no real errors per se)

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/
Dimonius
Regular
Posts: 14
Joined: Fri Jan 20, 2006 1:43 pm

Post by Dimonius »

package_event_ru.xml | 196311 bytes | 20.04.2006 | 18.01 GMT

--
i download it and validate in editor - it looks like nomal
upd
the xml file
http://netmirror.org/serendipity/package_event_ru.xml
is the same that my fetched
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hm, which PHP version do you have? It seems that the XML is somehow not properly parsed...

You could try to edit your serendipity_event_spartacus.php file.

Look for this:

Code: Select all

    function checkArray(&$tree) {
        if (!is_array($tree) || !is_array($tree[0]['children'])) {
           echo "DEBUG: The XML file could not be successfully parsed. Download or caching error. Please try again later or switch your XML/File mirror location. You can also try to go to the plugin configuration of the Spartacus Plugin and simply click on 'Save' - this will purge all cached XML files and try to download it again.<div style='display: none'>" . print_r($tree, true) . "</div><br />\n";
        }
    }
Change it to this:

Code: Select all

    function checkArray(&$tree) {
echo "<pre>" . print_r($tree, true) . "</pre>";
    }
This should give you a full Array listing of the completely parsed XML tree. Can you paste what you get somewhere?

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/
Dimonius
Regular
Posts: 14
Joined: Fri Jan 20, 2006 1:43 pm

Post by Dimonius »

Serendipity 1.0-beta2
Spartacus 2.5
PHP 4.4.0
MySQL 4.1.18

Trying to open URL package_event_ru.xml...
Fetched 196311 bytes from already existing file on your server. Saving file as path/blog/templates_c/package_event_ru.xml...



Fatal error: Cannot redeclare class serendipity_event_spartacus in path/blog/plugins/serendipity_event_spartacus/serendipity_event_spartacus_.php on line 19
nothing else
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

You are not allowed to have a "serendipity_event_Spartacus_.php" file in your directory. Move it somewhere outside of your /plugins directory tree please. Or rename it to "OLD.BAK". Something that is not interpreted as a s9y plugin. :)

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/
Dimonius
Regular
Posts: 14
Joined: Fri Jan 20, 2006 1:43 pm

Post by Dimonius »

oops =))

So array is so big, i ziped it here
http://froloff.net/tmp/array.zip
82 kb
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

That's strange. The array that is printed there should not give a foreach value, because it DOES have a $tree[0]['children'][0]['children'] array index.

Maybe it has to do with the russian XML file and maybe some russion text is buggy; could you temporarily switch your lange to english and see if those files are fetched without problems?

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/
Dimonius
Regular
Posts: 14
Joined: Fri Jan 20, 2006 1:43 pm

Post by Dimonius »

I can`t change blog languige =))
It`s another problem: when I change languige from Ru to En in configuration menu it say, that configuration changed and saved, but the languige is still russian, and when i go to configuration menu again, it`s show me russian there =)) very stange situation.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

You must change your personal language for your user account in the personal preferences! Language in Configuration only applies to the language for visitors.

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/
Dimonius
Regular
Posts: 14
Joined: Fri Jan 20, 2006 1:43 pm

Post by Dimonius »

ok, but on the test blog it changed to English in configuration menu directly
I have change the languige, and now thats all right! Thank you for your help!
=))
---
But I still can`t change global languige from Russian to Another in configuration menu =/
Maybe I start the new topic for this problem or it`s right to discuse this question here?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

If you want to change the global language, you are not allowed to be logged in. Personal language always takes precedence over global language, so as long as you are logged in you cannot see global language.

Try to use a different browser to visit your blog, a browser were you are not logged into your blog. There you should then see the language you configured.

So it works with english as spartacus language? Then there's something wrong with the babelfish russian language, since it's the ownly plugin that is translated for russian. Could you download the language file and tell me if proper UTF-8 characters show in that file? I don't know any russian so I can'T tell if the file is maybe double-encoded or so:

http://netmirror.org/serendipity/additi ... ru.inc.php

Regards,
Garvin

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/
Post Reply