1 users online. Create an account or sign in to join them.Users

Search

Hi there,
I have some complex url-parameters in my site like: $url-max-/ Worked fine for retrieving the wanted xml source

Problem is i upgraded my symphony and now parameters get displayed in the xml also
Which gives me the following xml error:

loadXML(): Couldn't find end of Start Tag url-max- line 25 in Entity, line: 25

This xml tag gives the error: <url-max-/ /> probably because of the double slash.

Now, i think removing the parameter pool from the xml will solve this, Is there an easy hack where i can do this? or is it more complicated?

I don't want to change the url parameters, cause it took me a while to make them all work

Commenting out these lines will give you a quick fix.

Thanks brendo!,
that fixed it

@brendo:
I updated symphony to 2.2.4 but and now your quick fix does not seem to work anymore...
After commenting out those lines, the ?debug page gives the following error:

Parse error: syntax error, unexpected T_VARIABLE, expecting T_FUNCTION in /home/xpresszo/domains/xpresszo.com/public_html/symphony/lib/toolkit/class.frontendpage.php on line 468

It's probably an easy fix but i'm pretty much a php noob :)

Could you post what PHP you've produced after commenting out the lines?

Just, commented out the lines, here's a snippet;

            /**
             * Access to the resolved param pool, including additional parameters provided by Data Source outputs
             * @delegate FrontendParamsPostResolve
             * @param string $context
             * '/frontend/'
             * @param array $params
             *  An associative array of this page's parameters

            $this->ExtensionManager->notifyMembers('FrontendParamsPostResolve', '/frontend/', array('params' => &$this->_param));

            $params = new XMLElement('params');
            foreach($this->_param as $key => $value) {
                $param = new XMLElement($key);

                // DS output params get flattened to a string, so get the original pre-flattened array
                if (isset($this->_env['pool'][$key])) $value = $this->_env['pool'][$key];

                if (is_array($value) && !(count($value) == 1 && empty($value[0]))) {
                    foreach ($value as $key => $value) {
                        $item = new XMLElement('item', General::sanitize($value));
                        $item->setAttribute('handle', Lang::createHandle($value));
                        $param->appendChild($item);
                    }
                }
                else if(is_array($value)) {
                    $param->setValue(General::sanitize($value[0]));
                }
                else {
                    $param->setValue(General::sanitize($value));
                }
*/
                $params->appendChild($param);

            }
            $xml->prependChild($params);

            Frontend::instance()->Profiler->seed();
            $this->setXML($xml->generate(true, 0));
            Frontend::instance()->Profiler->sample('XML Generation', PROFILE_LAP);

From what I can tell you broke the foreach. Comment out everything from

$params = new XMLElement('params');

to

$xml->prependChild($params);

including those two lines. It's a bit weird though that this hasn't been fixed after you've reported it. Has there never been a GitHub issue?

I see the problem;
The lines brendo pointed out do not correspond anymore with the number of lines in the update :)
This should be the new link
It's working now, thanks

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.2 or above
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.0 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details