sachatrauwaen / OpenContent

Structured Content editing for DNN (Dotnetnuke)
46 stars 25 forks source link

Template JSON Files Unexpectedly Modified #49

Closed pjones235 closed 5 years ago

pjones235 commented 5 years ago

Not sure where to start, but I've been noticing with several templates I have created in the latest release that when I make a change to the content within a template, it will remove certain options from the builder.json file for the corresponding template.

In particular, I make a lot of use of the imagecrop2 field type so that users can crop images prior to inserting them into a template. If I have such a template set up, go buy myself a burger, and come back, I'll find that the additional options associated specifically with imagecrop2 will be gone, such as width, height, upload/crop folders, etc., simply because a user edited the content.

Any ideas as to why this is happening? Occurring on multiple DNN installs and in multiple skins.

Timo-Breumelhof commented 5 years ago

Strange, I use the cropper2 a lot too and I have never seen this. Is this in OC 3.6? Is there anything special about the installation?

pjones235 commented 5 years ago

Nothing special about the installation. I was looking around, and I found that imagecrop2 is not included as a schematype within the formbuilder.js. I'm thinking that might be the cause of the issue.

It would make sense because you can't choose imagecrop2 from the field types within the actual form builder interface.

Timo-Breumelhof commented 5 years ago

Yes, you can loose some elements if manually create a schema and then use the builder. BTW for OC4 Sacha merged all image related fields into one ("image") and this should not be an issue any more, although you will probably have to adjust your schema.

pjones235 commented 5 years ago

Right, I was just confused because I have multiple people working with OC templates I've developed, and I hate having to tell them not to use the form builder because it will break the field type.

sachatrauwaen commented 5 years ago

If you want avoid people use the form builder, youu can just delete the builder.json

It will deactivate the builder, but everthing still work with the schema.json and options.json

pjones235 commented 5 years ago

I suppose that might be my best option, because then I can ensure users won't change anything in the builder. Between that and what @Timo-Breumelhof mentioned for OC4, I think we're all set. Thanks.