Spartacus Shows Plugins, But Not Styles

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
mixx941
Regular
Posts: 6
Joined: Tue Jul 18, 2006 8:37 pm
Contact:

Spartacus Shows Plugins, But Not Styles

Post by mixx941 »

Hi everyone. I've seen this issue on two different Serendipity 1.0 installs but my test install of 1.0 beta 3 works fine. After enabling Spartacus, it fetches the list of plugins when the install page is opened and shows the big list of all available plugins. If I go to try to install a style however, it fetches the XML list OK but then still only displays the styles that come with s9y. In other words, the new styles that are in the XML file do not get shown on the "Manage Styles" page to be able to be installed, and there are no errors about it either.

I've still got the 1.0 beta3 install running and it's still working fine with the exact same Spartacus configs as the two new 1.0 (final) installs (they are all on the same server).

Thanks in advance.

-Mark
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Post by stm999999999 »

same here: s9y 1.1alpha7
Ciao, Stephan
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

You both configured the XML and file mirror to Netmirror.org?

What is the spartacus output on top of the "Manage Styles" interface? How does your "package_template*.xml" files look like that should be downloadde into your templates_c directory?

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/
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Post by stm999999999 »

You both configured the XML and file mirror to Netmirror.org?
yes
What is the spartacus output on top of the "Manage Styles" interface?
Versuche URL package_template.xml zu öffnen...
101105 bytes von bereits bestehender Datei geladen. Speichere Inhalt als /home/www/manske-net.de/blog.stephan.manske-net.de/htdocs/templates_c/package_template.xml...
How does your "package_template*.xml" files look like that should be downloadde into your templates_c directory?
It begins with

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<!-- $Revision: 1.26 $ -->

<packages>
<package version="1.0" xmlns:requirements="http://spartacus.s9y.org/#">
<name>s9y Thin</name>
<template>s9y_thin</template>
<license>GPL</license>
<summary></summary>
<description></description>
<maintainers><maintainer><name>Kaustubh Srikanth</name><role>lead</role></maintainer></maintainers>
<release>
  <version>1.0</version>
  <requirements:s9yVersion></requirements:s9yVersion>
  <date>12/15/2004</date>
  <filelist>
<dir name="s9y_thin">
<file>info.txt</file>
<file>preview.png</file>
<file>style.css</file>
</dir>

  </filelist>
  <serendipityFilelist>
    <file>s9y_thin/info.txt</file>
    <file>s9y_thin/preview.png</file>
    <file>s9y_thin/style.css</file>
  </serendipityFilelist>
</release>
</package>
Ciao, Stephan
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Maybe you could edit your include/admin/templates.inc.php file.

Look for:

Code: Select all

    serendipity_plugin_api::hook_event('backend_templates_fetchlist', $stack);
add a

Code: Select all

echo '<pre>' . print_r($stack, true) . '</pre>';
after that line, and tell us what you see as the output?

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/
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Post by stm999999999 »

Versuche URL package_template.xml zu öffnen...
101105 bytes von bereits bestehender Datei geladen. Speichere Inhalt als /home/www/manske-net.de/blog.stephan.manske-net.de/htdocs/templates_c/package_template.xml...


Array
(
)
Ciao, Stephan
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Danke, das hilft schonmal und bedeutet, dass der Fehler innerhalb des Spartacus Plugins liegen muss.

Bitte mal die serendipity_event_spartacus.php öffnen.

Dort nach der Methode "buildTemplateList" suchen.

Dort folgendes:

Code: Select all

    function &buildTemplateList(&$tree) {
        $pluginstack = array();
        $i = 0;

        $mirrors = $this->getMirrors('files', true);
        $mirror  = $mirrors[$this->get_config('mirror_files', 0)];

        $this->checkArray($tree);
ändern in:

Code: Select all

    function &buildTemplateList(&$tree) {
        echo "Tree:<pre>" . print_r($tree, true) . "</pre><br />\n";
        $pluginstack = array();
        $i = 0;

        $mirrors = $this->getMirrors('files', true);
        $mirror  = $mirrors[$this->get_config('mirror_files', 0)];

        $this->checkArray($tree);
        echo "Tree 2:<pre>" . print_r($tree, true) . "</pre><br />\n";
Ich befürchte fast, dass die XML-Datei der Templates ungültig sein könnte...
# 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/
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Post by stm999999999 »

Code: Select all

Tree:
Array
(
    [0] => Array
        (
            [tag] => packages
            [attributes] => 
            [value] => 
            [children] => Array
                (
                )

        )

)

Tree 2:
Array
(
    [0] => Array
        (
            [tag] => packages
            [attributes] => 
            [value] => 
            [children] => Array
                (
                )

        )

)

Array
(
)
Ciao, Stephan
mixx941
Regular
Posts: 6
Joined: Tue Jul 18, 2006 8:37 pm
Contact:

Post by mixx941 »

Hi. I don't speak German, but I wanted to add that I confirm everything stm has found. I made the code changes and with them both made, here is my output:

Code: Select all

Select the template you wish to use for your blog

Trying to open URL package_template.xml...
Fetched 101105 bytes from already existing file on your server. Saving file as /usr/home/user/public_html/blog/templates_c/package_template.xml...


Tree:
Array
(
    [0] => Array
        (
            [tag] => packages
            [attributes] => 
            [value] => 
            [children] => Array
                (
                )

        )

)

Tree 2:
Array
(
    [0] => Array
        (
            [tag] => packages
            [attributes] => 
            [value] => 
            [children] => Array
                (
                )

        )

)

Array
(
)
Thanks

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

Post by garvinhicking »

Hi!

Okay, that confirms that somehow the XML does not get parsed at all. It might be an umlaut corruption problem of the XML, maybe caused by some of the new templates.

I will investigate this next week, I'll be gone now for the weekend...

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/
axelseaa
Regular
Posts: 49
Joined: Fri Dec 23, 2005 7:13 pm

Post by axelseaa »

garvinhicking wrote:Hi!

Okay, that confirms that somehow the XML does not get parsed at all. It might be an umlaut corruption problem of the XML, maybe caused by some of the new templates.

I will investigate this next week, I'll be gone now for the weekend...

Best regards,
Garvin
Any luck on this issue yet? Or is it one of those "long" weekends? :)

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

Post by garvinhicking »

Hi!

I got it! Sorry for not yet responding. :(

It was due to a "xmlns:requirements" XML namespace element in the template package.xml that was created by spartacus but could not be parsed properly.

I changed the generation code for that, so in the next refresh cycle (in about 18 hours) the new XML should be all fine. :)

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/
axelseaa
Regular
Posts: 49
Joined: Fri Dec 23, 2005 7:13 pm

Post by axelseaa »

garvinhicking wrote:Hi!

I got it! Sorry for not yet responding. :(

It was due to a "xmlns:requirements" XML namespace element in the template package.xml that was created by spartacus but could not be parsed properly.

I changed the generation code for that, so in the next refresh cycle (in about 18 hours) the new XML should be all fine. :)

Best regards,
Garvin
Thanks Garvin!
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Post by stm999999999 »

now it works! thanks!
Ciao, Stephan
mixx941
Regular
Posts: 6
Joined: Tue Jul 18, 2006 8:37 pm
Contact:

Post by mixx941 »

Thanks very much, here too :)

-Mark
Post Reply