You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description of the problem
I've found that trying out a specific Entries' data, whose url_title is "n" isn't working.
I need to use this url_title as it relates to the North London postcode region.
How To Reproduce
{exp:channel:entries channel="postcode" url_title="n" dynamic="no"}
{title}
{/exp:channel:entries}
Hi Havsviik,
An interesting workaround. Yes, that has worked for me. :-)
Hopefully this is something they can fix in the core EE software though.
Best wishes.
This is actually an issue with ee()->TMPL->fetch_param(), not the database query.
public function fetch_param($which, $default = FALSE)
{
if ( ! isset($this->tagparams[$which]))
{
return $default;
}
else
{
// Making yes/no tag parameters consistent. No "y/n" or "on/off".
switch($this->tagparams[$which])
{
case 'y' :
case 'on' :
return 'yes';
break;
case 'n' :
case 'off' :
return 'no';
break;
default :
return $this->tagparams[$which];
break;
}
}
}
Originating, I think, from this conditional in mod.channel.php
If I were fixing this I would add an array of ignored parameters in the fetch_param method and just return the original value and skip that switch statement.
if (in_array($which, ['url_title']) {
return $this->tagparams[$which];
}
Activity
Havsvik commentedon Dec 19, 2019
Seems like 'n' is changed to 'no' in the database query.
Small hack: Try adding a
|, likeurl_title="n|", it should now be treated as an array in the database query, and is not changed to 'no' :)Hope this helps!
ic360-com commentedon Dec 20, 2019
Hi Havsviik,
An interesting workaround. Yes, that has worked for me. :-)
Hopefully this is something they can fix in the core EE software though.
Best wishes.
litzinger commentedon Jan 6, 2020
This is actually an issue with ee()->TMPL->fetch_param(), not the database query.
Originating, I think, from this conditional in mod.channel.php
If I were fixing this I would add an array of ignored parameters in the fetch_param method and just return the original value and skip that switch statement.
ic360-com commentedon Jan 20, 2020
Thanks Brian - this is way out of my skillset, so hopefully a fix (or something) can be included in a future EE update. :-)
Merging bug/337-url-title-n, resolves ExpressionEngine#337