-
Notifications
You must be signed in to change notification settings - Fork 671
[4.x]: Category values deleted when saving an entry #13057
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
Comments
Hello there! We are having kinda same issue. |
Hi, thanks for reaching out. I’m having trouble replicating this issue. Would you be able to please send over your |
Hi @i-just! I'm afraid we can't send too much of our project's configuration (as that's classified), but we'll try to send you something that's a good replication of our situation. |
After some debugging in a stripped down repo it appears that newly created categories do not disappear, whereas previously existing categories are deleted upon save. @aleksei-kadeikin can you confirm that this is also the case on your end? |
Hi @i-just, I've just emailed you a stripped down version of our project config + composer.lock |
FYI:
|
If anyone else is able to provide Composer files + a database backup where this issue is reproducible, please send it to [email protected]. |
I did entrification. on multisite setup.. And im able to add to entry exiting categories that are saved to all sites.. But not newly created Categories with propagation method |
@wmdhosting, let’s say you have 2 sites; you entrified your categories, and then for one of them, you changed the propagation setting to “let each entry choose which sites it should be saved to”; for that section (that used to be a category group) you created new entries which are enabled for both sites, and you can’t select those the newly created entries via the entries (formerly categories) field? Are there any errors shown or logged? Or are the new entries just not visible to select? Or are they disappearing upon saving, as mentioned previously in this thread? |
|
@wmdhosting, can you please send your composer files and a database backup (from after the entirfication) to [email protected] so we can dig deeper? |
OK. will try to put someowhere for download. as pretty big .. is 130 city portals. site setup... |
OK. I can finally replicate it on a clean Craft 4 instance (even without entrification). Thank you, @wmdhosting, for sending your files and screenshots - much appreciated! To replicate, you need to have the following:
I’m now working on a fix. |
This is now fixed in Craft 4.4.8! (via #13119) I think we were all looking in the wrong direction initially. Categories don’t have custom propagation method settings – they are supposed to always propagate to all sites. However this could be a bug if there were any categories that hadn’t actually been propagated to all sites yet, e.g. if a new site was created and the queue job that is supposed to propagate categories to it hadn’t completed yet. Which would explain why the bug may have only occurred for older categories but not new ones. |
What happened?
Description
We've gotten a report from one of our clients that since a recent Craft update (earlier this week), values of category fields disappear after saving an entry in the CMS.
The setup is as follows:
category
fieldsAt first it seemed totally random when the categories disappeared, but I've got a hunch that it has something to do with the autosave draft feature. If I manage to save the entry (using
CMD + S
) before the autosave has finished, the values are saved correctly.Steps to reproduce
CMD + S
Expected behavior
Category values should be saved correctly. This is a rather large problem, as editors may unknowingly remove large parts of the website when editing unrelated content.
Actual behavior
See description above.
As the behaviour started happening after a Craft CMS (and maybe some plugin) updates, I suspect something's gone wrong there.
Hope you can help us out!
Thanks,
Lars
Craft CMS version
Craft Pro 4.4.6.1
PHP version
8.1.17
Operating system and version
Linux 5.4.0-146-generic
Database type and version
MySQL 8.0.32
Image driver and version
Imagick 3.6.0 (ImageMagick 6.9.10-23)
Installed plugins and versions
The text was updated successfully, but these errors were encountered: