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

Grid field storing data when rows are empty. #3715

Open
DesignWorkshop opened this issue Aug 21, 2023 · 4 comments
Open

Grid field storing data when rows are empty. #3715

DesignWorkshop opened this issue Aug 21, 2023 · 4 comments

Comments

@DesignWorkshop
Copy link

EE 7.3.11
PHP Version 8.0.24

I have a grid field with a minimum entry requirement of two rows.

I check if the field is not empty in the template code {if product_how_it_works}Show content{/if}

This works if the entry has no content in the grid field. If you then save the entry without adding any content to the grid field the conditional does not work.

Likewise if the grid field has content and it's deleted it's as if the content is still there.

@robinsowell
Copy link
Contributor

I'm a little confused- are you saying it works on preview, but not after you save?

This works if the entry has no content in the grid field. If you then save the entry without adding any content to the grid field the conditional does not work.

Reading it, it sounds like there's no content in the grid field in both cases?

Also- I don't THINK the latest version directly fixed a bug concerning grid conditionals, but I know there have been a few tweaks. Is it possible to double check on the latest version?

@DesignWorkshop
Copy link
Author

I'm on the latest version 7.3.11.

Product detail page with no 'How it works' content.
product-details-before-saving

The product edit page with the 'How it works' field with no content entered.
product-entry-page

The product details page after saving shows the 'How it works' conditional even though no content was added
product-details-after-saving

@robinsowell
Copy link
Contributor

Got it- so when you save an entry the first time with no info in the grid, conditional works. When you EDIT that entry and save, without altering the grid at all, conditional does not work. If you add info to the grid, save, it works. DELETE that info from the grid, it doesn't work.

Let's see if I can replicate- yell if I don't understand correctly.

@DesignWorkshop
Copy link
Author

Got it- so when you save an entry the first time with no info in the grid, conditional works. When you EDIT that entry and save, without altering the grid at all, conditional does not work. If you add info to the grid, save, it works. DELETE that info from the grid, it doesn't work.

That's correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants