Skip to content

Previewing an entry with grid shows incorrect data when applying search parameter to checkboxes column #2122

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

Closed
hopDrew opened this issue Jun 23, 2022 · 7 comments
Labels
Bug: Accepted Bug has been confirmed, is reproducible, and ready to work on.

Comments

@hopDrew
Copy link

hopDrew commented Jun 23, 2022

image

In the image attached, we have an entry with multiple images with additional corresponding content and attributes in a grid. When previewing the entry (and regardless of what other images are present) the first image is being used for all of the images in the preview pane.

This only happens in the entry preview, as the entries themselves are fine when displaying on the front-end.

Images are parsed with jcogs_img prior to being output on our production site, but I've also tested this locally with and without the jcogs_img tags and I have noticed no changes in behaviour.

EE Version 6.3.4
PHP 7.2
MySQL 5.0

@TomJaeger
Copy link
Contributor

@hopDrew Thanks for submitting this. Just to confirm, the file here is a standard EE File field?

@hopDrew
Copy link
Author

hopDrew commented Jun 24, 2022 via email

@TomJaeger
Copy link
Contributor

Awesome,

With a quick test we were not able to replicate it... Any chance you can post a simple example for replication? (Also any other add-ons at play here?..)

Thanks,
-Tom

@hopDrew
Copy link
Author

hopDrew commented Jun 24, 2022

Here is the field list for our project images file grid
image

Here are our project entries fields
image

From what I can tell, none of our addons would be interfering with this:
image

Here is what our project images fields look like:
image

Note that one image is marked as featured, and one is marked as a halfway image.

Here you can see that all of the images on the page are strictly the "feature" image:
image

Code snippet for our featured image:
image

Code snippet for our midway image:
image

@hopDrew
Copy link
Author

hopDrew commented Jun 30, 2022

Hi @TomJaeger,

If you haven't been able to replicate this issue yet, can you please let me know if there's any further information I can provide?

Thanks,
Drew.

@TomJaeger
Copy link
Contributor

Hi @hopDrew,

I've been out of the office a good bit here recently, so haven't had a chance to dig in beyond the initial testing mentioned above.

Few thoughts on this one as a whole.

  1. Any chance you can put together the most simplistic example to replicate the issue? (anything to simplify the replication of the bug will greatly expedite us in replicating it and working towards a fix).... Might be easiest to start a new channel, and start adding the fields to it with a simplistic template 1 at a time or something along those lines... to find out where things start getting messed up.. from there it might be easy to streamline the example down to the 1 field or something along those lines.
  2. If you backup your DB, and then start uninstalling add-ons 1 at a time and testing, does it start working after a specific add-on (this might be easier to test then Release 5.0.0 #1 above)

Thanks,
-Tom

@hopDrew
Copy link
Author

hopDrew commented Jul 8, 2022

Hi @TomJaeger,

Sorry for the delay on this. I'm still figuring my way around EE a bit.

I've been able to reproduce this issue on one of our experimental sites. Here's what I did.

1. Create a new template group and template (our_work/item) (Apologies about the image, github was not playing nice with the pasted content)

image

2. Create a new field group called Project Fields

3. Add a new field to the group called "Project Images".
image
3 a. The grid fields are as follows:

Field 1

  • Type: File
  • Name: Project Feature Image
  • Short: project_feature_image
  • Column minimum width: 300
  • Allow file types: All
  • Allowed directory: Uploads
  • Show Existing FIles: On

Field 2

  • Type: File
  • Name: Project Thumb Image
  • Short: project_thumb_image
  • Allow file types: All
  • Allowed directory: Uploads
  • Show Existing FIles: On

Field 3

  • Type: Checkboxes
  • Name: Is this a special image?
  • Short: is_special
  • Include In Search: On
  • Text Formatting: None
  • Populate Manually: featured, midway

Field 4

  • Type: Text Input
  • Name: Project Feature Alt Text
  • Short: project_feature_alt_text
  • Maximum Characters: 100
  • Text Formatting: None
  • Direction: L -> R
  • Allowed Content: All

4. Create a new Channel

Channel

  • Name: Projects
  • Short Name: projects

Fields

  • Title field label: Title
  • Field Groups: Project Fields

Settings

  • Channel: HTTP(s)://whatever.your.domain.is.com/our_work
  • Comment form: same as above
  • Search Results: same as above
  • Allow Preview: Enabled
  • Preview URL: our_work/item/{url_title}
  • Status: Open
  • HTML Formatting: Allow all HTML
  • Allow image URLS?: Enabled
  • Enable sticky entries: Enabled
  • Enable entry versioning?: Enabled
  • Comments: Disabled

5. Create a new entry under projects

  • Title: OpenMedia
  • URL title: openmedia
  • Project Images: PLEASE SEE ATTACHED IMAGES

image

Options

  • Channel: Projects
  • Entry Status: Open

Pages

  • Pages URI: /our_work/openmedia
  • Template: our_work / item

Images Used For Testing

Openmedia_feature1
openmedia_feature1

Openmedia_feature2
openmedia_feature2

Openmedia_feature3
openmedia_feature3

Openmedia_feature4
openmedia_feature4

Openmedia_thumbnail1
openmedia_thumbnail1

Openmedia_thumbnail2
openmedia_thumbnail2

Openmedia_thumbnail3
openmedia_thumbnail3

Openmedia_thumbnail4
openmedia_thumbnail4

When the entry is complete, you will see while previewing that two of the same images appear, as opposed to when you view {domain}/our_work/openmedia and both images are different.

For comparison, here is my preview screen in which you can see from the HTML headers that the featured and midway images are different:
image

And here is the same page rendered on the front end:
image

@intoeetive intoeetive added the Bug: Accepted Bug has been confirmed, is reproducible, and ready to work on. label Aug 17, 2022
@intoeetive intoeetive changed the title Previewing an entry with more than one image will only render the first image. Previewing an entry with grid shows incorrect data when applying search parameter to checkboxes column Aug 17, 2022
intoeetive added a commit that referenced this issue Aug 17, 2022
…late was using search on checkboxes column in Grid

(cherry picked from commit 52c46c3)
matthewjohns0n added a commit that referenced this issue Sep 6, 2022
…grid-search

Resolved #2122 where Live Preview was not working correctly when template was using search on checkboxes column in Grid
Yulyaswan pushed a commit that referenced this issue Oct 24, 2022
…late was using search on checkboxes column in Grid

(cherry picked from commit 52c46c3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug: Accepted Bug has been confirmed, is reproducible, and ready to work on.
Projects
None yet
Development

No branches or pull requests

3 participants