We have the following page for our own redirects.
{exp:channel:entries channel="redir" url_title="{segment_2}" limit="1"}
{if no_results}
{redirect="404"}
{/if}
{exp:redirect_to location="{redirlink}"}
{/exp:channel:entries}
This worked fine in v6.
If we strip this back to just the entries line and output {redirlink}
there is no output, but there is an entry matching it as has existed for some time.
Are we missing something obvious from the upgrade?
To update this:
Actually, we’ve found the cause and not sure if this is a bug or new expected behaviour?
We have the same channel name on two MSM sites. When calling the entries whilst that is the case, there was no output. Changing the name of one of them resulted in results being returned.
Is the same channel name not possible across installs with multiple sites as once was? This broke immediately on the v7 upgrade.
XCL. Sorry no one has jumped in to help out. {exp:redirect_to}
isn’t part of ExpressionEngine. This is from a third-party add-on (https://devot-ee.com/add-ons/redirect-plugin) that I don’t know when was the last time it was updated. You guys may have a custom version of this add-on that it using something which is broken in EE7. The add-on first came out in v1 so that was many many years ago.
I would suggest that you use the native {redirect}
template variable instead and see if that works better for you. ( {redirect}
docs )
Sorry, you’re missing the point.
Ignore that (it’s our own adaptation), just calling articles from the example: {exp:channel:entries channel="redir" url_title="exampleredirect" limit="1"}
, gives no results when the channel name exists on two sites.
For example:
{exp:channel:entries channel="redir" url_title="exampleredirect" limit="1"}
{redirlink}
{/exp:channel:entries}
redirlink simply returns a text value when it works and currently no value on v7.
If we rename “redir” channel on one of the the sites, leaving only one site with that channel name, it works fine.
Reverting the code to v6 in place of v7 fixed the issue, and both sites can use the same channel name.
And to avoid any redirection based confusion, this is the same on all pages where the same channel names are used which have no redirections, just articles.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.