Closed (fixed)
Project:
Autosave Form
Version:
8.x-1.x-dev
Component:
Code
Priority:
Minor
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
9 Nov 2016 at 14:10 UTC
Updated:
26 Mar 2017 at 09:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
rajab natshahThis happens at the visual view and the console command which needs the bootstrap of drupal.
Comment #3
rajab natshahComment #4
rajab natshahI think when we have them all together.
Comment #5
hchonovFor the module to work you need the first patch referenced in the module description, the others are needed only when you are dealing with nested entity inline forms. This is a dev version and the patches are making corrections at the same place so if you need all then you need a custom solution or e.g. use https://www.drupal.org/node/2816097#comment-11769809 where I am experimenting.
This is not critical, as the problems are in core preventing the module of working properly in some cases.
Comment #6
rajab natshahHi Hristo,
Rewarded work you have on this module,
I do think that managing fields and fields types will be not the optimal solution. as we could have some custom fields or contributed fields.
I think the way of having the get Build info and saving the form_status or the $_POST.
then restoring a build for the form will do the best work. as you could have many scenarios to go work the the module will break the form.
It feels that we are in an Agile to have this autosave functionality.
Last weekend I started to work on Port [Autosave] module to D8 to use it in a project.
I'm about to finish the port.
I have seen that you are using the entity storage way, which is good.
let us see which module will be used in the project :)
Rewarded :)
Comment #7
hchonovI do not understand this? I am not dealing with any fields or field types?
POST will not help you when you are dealing with entity references and information stored in the form state. What is done here is done with thinking of doing complex stuff with nested entity forms and saving states in the form state.
The way the other module is doing this works only for regular forms but not entity forms - e.g. try there to add a new field item "Add new item" and put some data on it and later restore the state -> it will be missing. This is an issue my module is solving.
Comment #8
rajab natshahAha, You are right. I see your point.
Hristo, I had a look at your code yesterday. It's a clean way to work with storage like that.
I think it's the 4 patches issue and the UX/UI. we can not get the module work right a way out of the box.
We may go and save all the form_status integrator objects, then restore them back to form build then replace the form directly.
Let see which one get better then fast.
I'm leaning to your way of work but with a different UX/UI.
Comment #9
rajab natshahMany thanks for your work on this module.
Comment #10
hchonovWhat is the problem with the UX/UI?
Comment #11
rajab natshahIf you try the Drupal 7 module
https://www.drupal.org/project/autosave
You will see how is that different from your UX/UI.. We could save the form without even showing any bar at the bottom.
Some config for timing will help too.
I would put the patch for my work in Port [Autosave] module to D8
Not sure yet if we go with your module or the new port.
Thank you.
Comment #12
hchonovWell this is still the first implementation of my module as a proof of concept. Sure there are things that still have to be made better.
Regarding the config about the timing - as described in the module description a better approach than a timing is desired, so when we have figured this out there will be configs for this.
Regarding the UI - my UI is influenced by the one Confluence is using and the restore ability should only be offered when you visit the page, afterwards it is pointless - unnecessary element on the page. We want to keep things as minimal as possible.
Comment #13
rajab natshahComment #14
hchonovWhat do you mean that the patches break the bootstrap? If you have found any problems there please provide this information on the issues itself. I have currently all the patches in my system and everything is working fine.
Is still anything that is still left to be answered or discussed here or we can close the issue?
Comment #15
rajab natshahGot that Hristo :)
- Entity storage is good but you had problems with entity references. using that way.
- The UX/UI is good. It's just a matter of workflow. and having it work out of the box.
- Having the post or the form_status serialized will keep every values which could have been POSTED.
Comment #16
hchonovIt is not only me having problem with entity references, even the core has problems there because it is not able of serializing entity references into the form state .. So about that we have an issue for the core where we are trying to solve this problem.
I am still pointing out, that this module has still only a dev version and to make it work properly we still have core issues to fix first so that there is no need of applying patches.
Comment #17
rajab natshahWith you on that. many issues need to be fixed in Core.
Comment #18
hchonovNot that many issues and we are actively working on the relevant issues for this module.
Comment #19
hchonovThe module has been just rewritten, so that it does not require any core patches - only the ones for deep serialization in case you are using nested inline entity forms, but the contrib ones currently are not supporting yet deep serialization. Therefore I am closing the issue as fixed.
Comment #20
rajab natshahThank you very much :)
Rewarded work :)