-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Channel parameter -- buggy behavior in v 6.4 -- home channel #2553
Comments
@mcfarlandonline does this only happen when displaying the entries from a site other than you're currently viewing? Or each time whenever |
I work with @mcfarlandonline (who is on vacation this week). The use of, or absence of, the site="" parameter doesn't change the outcome/bug. We did find that we could use the channel="" parameter and leave it empty, and the content still shows up. Both installs of EE where this is happening (now a second one with v6.4.1) are site ID #1. |
@PDXMan1 can you DM me (or email yuri@packettide.com) the actual templates you're using? And (if possible at all) the DB dump with sensitive info obfuscated. |
Hrm- I think I see what's going on, it's getting the channel id wrong sometimes- I think when it's MSM and the same channel name exists on both/multiple sites. Not ALWAYS but sometimes. Probably an array index somewhere. Testing on a site having the issue. I'm on site 1 on the frontend, but if I look at queries in debug: It's looking for channel id 3. But channel id 3 is in site 2. Sum total of the template I'm testing on is
Site id parses as 1. So... it's basically getting the wrong channel id. This does NOT happen on my tests, but I bet it's just random. Whatever 'news' channel shows up first (or last) is the one it thinks it's supposed to use. |
This would totally explain what we’re seeing.
I just checked our install having the issue on both the “home” and “about” channel, and both sites in the MSM install have channels by those two names (home & about).
In the other MSM install, only the home channel has the issue, as none of the other channel short names are duplicated between the two sites.
We are providing the site_id to the tag and have dynamic=“no” to help avoid this kind of site confusion, but this bug is ignoring our best of intensions.
This would also explain why we’re only seeing this in MSM sites on 6.4.+
- Kurt
<https://www.facebook.com/netraising/>
<https://twitter.com/netraising>
<https://www.linkedin.com/in/kurtdeutscher/>
Kurt Deutscher
Founder + Principal Consultant
NetRaising®
Certified B Corporation®
503-946-8214 <tel:503-946-8214>
***@***.*** ***@***.***>
https://netraising.com <https://netraising.com/>
Portland, Oregon USA
… On Nov 30, 2022, at 2:54 PM, robinsowell ***@***.***> wrote:
Hrm- I think I see what's going on, it's getting the channel id wrong sometimes- I think when it's MSM and the same channel name exists on both/multiple sites. Not ALWAYS but sometimes. Probably an array index somewhere.
Testing on a site having the issue.
I'm on site 1 on the frontend, but if I look at queries in debug:
<https://user-images.githubusercontent.com/1181219/204925160-90337309-4d98-4948-8e70-7c831c3eaabe.png>
It's looking for channel id 3. But channel id 3 is in site 2.
<https://user-images.githubusercontent.com/1181219/204925308-bac0434d-581f-40fc-bfc4-9eaea8d7bf2f.png>
Sum total of the template I'm testing on is
{exp:channel:entries channel="news"}
{if no_results}nada{/if}
<h2>{title}</h2>
{/exp:channel:entries}
Site id parses as 1. So... it's basically getting the wrong id.
This does NOT happen on my tests, but I bet it's just random. Whatever 'news' channel shows up first (or last) is the one it thinks it's supposed to use.
—
Reply to this email directly, view it on GitHub <#2553 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABO4INT24YPQXQDH3A2PMCDWK7LKZANCNFSM6AAAAAASIL4TKQ>.
You are receiving this because you were mentioned.
|
…esults on MSM installations with duplicate channel names
…esults on MSM installations with duplicate channel names
Thank you @robinsowell ! Once we know what's causing it, it's easy to fix :) Referenced here are the pull requests with the fixes for 6.x and 7.x. |
Hm... I updated the four replacement lines of code for EE v6 and I'm getting this "notice": Trying to get property 'channel_name' of non-object Could you email me a copy of the working file you have? I may have cut-and-pasted something incorrectly. |
@PDXMan1 you can just replace the whole file from PR: https://raw.githubusercontent.com/ExpressionEngine/ExpressionEngine/45e385c9dbac051020ecc5f8daaf5c228a92ffd5/system/ee/ExpressionEngine/Addons/channel/mod.channel.php |
…nels-names-on-msm-bug Resolved #2553 where `{exp:channel:entries}` output could miss some results on MSM installations with duplicate channel names
…nels-names-on-msm-bug Resolved #2553 where `{exp:channel:entries}` output could miss some results on MSM installations with duplicate channel names
EE version 6.4 - MSM site
PHP 7.4
I'm not sure if this is related to issue #2525 or not, but we're experiencing odd behavior in one of our MSM sites.
Oddly enough, the issue seems to be occurring only in the Home channel; and it was only happening in 1 of the 2 sites of the MSM install.
I had to remove the channel parameter from this entries tag to get anything to show up:
So now this works:
We had several embedded templates within the home channel's main template, and for each of those embedded channel entries tags, we had to remove the channel parameter to get content to show up.
The text was updated successfully, but these errors were encountered: