Skip to content
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

Closed
mcfarlandonline opened this issue Nov 22, 2022 · 8 comments · Fixed by #2585
Closed

Channel parameter -- buggy behavior in v 6.4 -- home channel #2553

mcfarlandonline opened this issue Nov 22, 2022 · 8 comments · Fixed by #2585

Comments

@mcfarlandonline
Copy link
Contributor

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:
Screen Shot 2022-11-22 at 3 40 54 PM

So now this works:
Screen Shot 2022-11-22 at 3 41 02 PM

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.

@intoeetive
Copy link
Contributor

@mcfarlandonline does this only happen when displaying the entries from a site other than you're currently viewing? Or each time whenever site parameter is used?

@PDXMan1
Copy link

PDXMan1 commented Nov 29, 2022

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.

@intoeetive
Copy link
Contributor

@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.
No one here was able to replicate your issue using just the code provided, so we feel like the problem is either in template tags combination or the exact site setup that you have

@robinsowell
Copy link
Contributor

robinsowell commented Nov 30, 2022

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:

Screen Shot 2022-11-30 at 5 50 20 PM

It's looking for channel id 3. But channel id 3 is in site 2.

Screen Shot 2022-11-30 at 5 51 51 PM

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 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.

@PDXMan1
Copy link

PDXMan1 commented Dec 1, 2022 via email

@intoeetive
Copy link
Contributor

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.
We'll make sure to have those released ASAP

@PDXMan1
Copy link

PDXMan1 commented Dec 1, 2022

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
ee/ExpressionEngine/Addons/channel/mod.channel.php, line 1210
Severity: E_NOTICE

Could you email me a copy of the working file you have? I may have cut-and-pasted something incorrectly.

matthewjohns0n added a commit that referenced this issue Dec 5, 2022
…nels-names-on-msm-bug

Resolved #2553 where `{exp:channel:entries}` output could miss some results on MSM installations with duplicate channel names
matthewjohns0n added a commit that referenced this issue Dec 5, 2022
…nels-names-on-msm-bug

Resolved #2553 where `{exp:channel:entries}` output could miss some results on MSM installations with duplicate channel names
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants