Module Builder Small Bug and Separate "Issue"

Posted by Liam on 22-Mar-2019 17:05

On Sitefinity 11.2.6900 - just noticed that there appears to be a small bug in Module Builder. When editing an existing content type, if you delete a field and then re-add it with a different type (but the same name), this change is not saved when clicking Finish. Reopening the content type shows that the change was never made, and this happens always.

The issue appears to be that deleting a field from a content type does not actually happen until you've submitted the changes to the entire content type by clicking Finish, and programmatically fields seem to be referenced based on name and not an internal id - so if you re-add that field with the same name, even as a different type, the new field will NOT be saved, and the old supposedly deleted field will remain.

This occurs often when building modules - you decide you want a field to be a different type. Oddly you are not able to change a field's type after adding it - clicking the field only opens the second field-creation modal allowing you to customize labeling etc. So this leads the user to deleting and re-adding the field with the different type, except now this will not work.

The workaround to this bug is to delete the field, save the content type, re-open the content type and add the field back in with the desired type. This is fine once or twice but gets annoying if it has to be done for a lot of fields or content types.

To me the fix for this is to either correct the behavior preventing deleting and re-adding fields with the same name in one edit, or to allow people to change content types of fields without deleting and re-adding them.

The second issue I noticed is just an odd design choice - why must Content Identifiers be short-text types? I understand for the purpose of human readable URLs but there are plenty of scenarios where a content type in no way needs a human-readable URL, in fact in the case of our Sitefinity projects there are many content types that simply exist to feed data into external applications and so the URL is completely unused. To me, it makes sense to allow a hidden GUUID field to be the unique identifier, though perhaps there is a reason why this is not the case - curious to hear

All Replies

This thread is closed