We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

v6-v7 entries behaviour

How Do I?

xcl's avatar
xcl
116 posts
6 months ago
xcl's avatar xcl

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?

       
xcl's avatar
xcl
116 posts
6 months ago
xcl's avatar xcl

I have also tried setting the url_title to a matching entry.

{exp:channel:entries channel="redir" url_title="exampleredirect" limit="1"}

It returns no matches which is wrong.

       
xcl's avatar
xcl
116 posts
6 months ago
xcl's avatar xcl

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's avatar
xcl
116 posts
6 months ago
xcl's avatar xcl

If there was ever an advert not to upgrade to a paid-sub in 7, this thread is it. Zero support in 4 days for a breaking issue. Even attempted to get help via Slack.

Reverted the site to the last 6.x code base and the problem has stopped.

       
Andy McCormick's avatar
Andy McCormick
316 posts
6 months ago
Andy McCormick's avatar Andy McCormick

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 )

       
xcl's avatar
xcl
116 posts
6 months ago
xcl's avatar xcl

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.

       
Andy McCormick's avatar
Andy McCormick
316 posts
6 months ago
Andy McCormick's avatar Andy McCormick

ah. sorry I missed that. Let me set this up and test locally. No changes stick out to me that would have changed this behavior, but I’ve pinged the team to see if they have any ideas

       
Andy McCormick's avatar
Andy McCormick
316 posts
6 months ago
Andy McCormick's avatar Andy McCormick

By any chance, does this happen on all the MSM sites? I seem to be replicating something similar, but only on additional MSM sites. The first site I made with the, now duplicated, channel name is the only one that doesn’t seem to work.

       
xcl's avatar
xcl
116 posts
6 months ago
xcl's avatar xcl

Both sites which conflict are MSM sites. We only used on two but testing on multiple saw similar behaviour with test channels.

We don’t use the main/site domain as a live site; only for admin.

       
Andy McCormick's avatar
Andy McCormick
316 posts
6 months ago
Andy McCormick's avatar Andy McCormick

ok. We’re definitely seeing some strange behavior and have replicated where sharing channel names and fields are displaying incorrect results.

       
xcl's avatar
xcl
116 posts
6 months ago
xcl's avatar xcl

Thanks. Any time frame on a fix so we can put the v7 code base back?

       
Tom Jaeger's avatar
Tom Jaeger
332 posts
2 months ago
Tom Jaeger's avatar Tom Jaeger

Just to update this thread… It should be fixed now!

Thanks,

-Tom Jaeger

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.