Jump to content

URL multiple SEO Titles error


LaCollision

Recommended Posts

Hi,

I'm not able to make multiple SEO Titles work in a URL component...

In my furl.json file, I have something like this:

	    "my_url": {
	        "friendly": "/{?0}-{#pid}/folder/{?1}-{#id}",
	        "real": "app=myapp&module=mymodule&controller=mycontroller"
	    },

… and in my template:

{url="app=…&pid=…&id=…" seoTemplate"my_url" seoTitle="value1, value2"}

 

Then I always have this error in DEV mode:

IPS \ Http \ Url \ Exception
SEO_TEMPLATE_IS_NOT_VALID_FOR_URL

…/Sites/workspace/podcastics/system/Http/Url/Friendly.php:156

 

It looks like the issue comes from the method:

	protected static function getMatchedParamsFromFriendlyUrlComponent( $furlDefinition, $friendlyUrlComponent )
	{		
		/* See if it matches */
		$seoTitles = array();
		$matchedParams = array();
		foreach ( $furlDefinition['regex'] as $_regex )
		{
			if ( preg_match( '/^' . $_regex . '$/i', $friendlyUrlComponent, $matches ) )
			{
				foreach ( $furlDefinition['params'] as $k => $param )
				{
					if ( $param )
					{
						$matchedParams[ $param ] = $matches[ $k + 1 ];
					}
					else
					{
						$seoTitles[] = $matches[ $k + 1 ];
					}
				}
							
				return array( $matchedParams, $seoTitles );
			}
		}
		
		/* Still here? No match */
		return NULL;
	}

 

I've checked that in this method, the line:

if ( preg_match( '/^' . $_regex . '$/i', $friendlyUrlComponent, $matches ) )

 

… always returns false in my case.

 

Any idea?

 

Thank you!

 

Note: this error only appears in DEV mode, and not in regular mode.

When I'm not in DEV mode, the correct URL is built in the template – so it works, except when in DEV mode.

 

Thanks 🙂

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...