-
Notifications
You must be signed in to change notification settings - Fork 111
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
issue together with userforms. Page can't be published when formfield is removed from form #676
Comments
@guyvanbael can you find out where that publishSingle() is being called from? what file and line number? |
@tractorcow Here's the stack trace. Thanks for looking into it.
|
@tractorcow I also found this in my debug log file |
Yeah it's this
It would seem that the record is not being loaded properly in draft mode; If we are in the CMS, fluent should not prevent items being queried. UNLESS you are using |
No. It. Uses the standard fluent extension
Op do 4 feb. 2021 22:59 schreef Damian Mooyman <notifications@github.com>:
… Yeah it's this
// Non-recursive publish
$object = $this->getObjectInStage(Versioned::DRAFT);
$object->publishSingle();
It would seem that the record is not being loaded properly in draft mode;
If we are in the CMS, fluent should not prevent items being queried.
UNLESS you are using FluentFilteredExtension. does your project use this?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#676 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAXUROL6NDXSOS2FRELGSGTS5MKDJANCNFSM4W4YZJNQ>
.
|
@tractorcow is there something i can do as a workaround untill this issue is adressed? |
Still trying to figure out what the issue is sorry =( |
@tractorcow adding a check for null object in ChangeSetItem.php right before $object->publishSingle(); (like if($object == null) break;) fixes the issue and probably isn't a bad idea either, but maybe fluent should implement a check before it reaches silverstripe\versioned\ChangeSetItem.php |
We are also hitting this. I guess everyone with both fluent and userforms will at some point. Here's the issue on the userforms module, since I haven't seen it linked here yet and its got some good context: silverstripe/silverstripe-userforms#996 What is supposed to happen in fluent when an object is deleted in one locale? Does it populate that change to other locales? This might be obvious, but I think it's trying to publish a deleted record. Related: Userforms uses delete, rather than the archive action. When I replace with this it works as expected (and allows publish).
Is there a reason we know of why Userforms is using a delete action on a versioned record? Would it be worth trying to get that replaced in the Userforms module? |
It's supposed to delete only that locale, and from the root record on the LAST locale deleted. Check out the deletion policy API that goes into more detail. Simple fix, you could try adding We had to do this for siteconfig.
This will , probably, prevent ChangeSet from loading "null" for the deleted field. It's not fully deleted, it exists in the db, but not for the current locale. That flag still filters it out though, so it's "soft deleted" in the current locale. |
@tractorcow Unfortunately it doesn't help in this case. This:
will still result in the same error. |
Hello !! |
Adding extension to editableformfield, makes the userdefinedform translatable, but...
after removing a field from the form, it's not possible to publish the form anymore. ([Emergency] Uncaught Error: Call to a member function publishSingle() on null).
Unplushing an republishing the form solves the issue, but triggers another userforms issue which deletes the recipients from the form.
The text was updated successfully, but these errors were encountered: