Local block not included in code makes all other properties blank in UI


On our webpage we have a site settings page with lots of settings for the site. I have in a new git branch created a new local block with some properties. When going back to another branch that removes this block from code makes it appear on the first tab as usual but all other properties on this page is blank in the gui. Querying the properties from code returns the values but in edit mode everything else is blank. The removed blocks properties has it's values though. Never seen this before and haven't yet tried to reproduce it in an Alloy site or something but switching back to the branch where the local block is included again resolves the issue

Jun 26, 2020 10:12

Are you getting any console errors Chrome when calling the APIs? I've had quite a few problems with local blocks so tend to steer clear of them myself, I'd suggest delting this block in the admin when switching back unless you really have to have the content. Also personally when working with branching I prefer to clean and re-restore the database from the current develop branch (when working in a feature branch process) so you're always working on a database that match the branch else especially with multiple developer the content syncing can have issues.

Jun 26, 2020 11:56

No errors in console. Deleting the block in admin also resolves the issue so clearly it is some bugs regarding local blocks not present in code. Oh well, new lesson learned or should this be reported?

Jun 26, 2020 12:42
Tomas Hensrud Gulla - Jun 26, 2020 16:23
I think it's worth reporting.

To resolve the issue, enter admin mode, content types, then locate your page types. Locates the local block in the list of properties, verify that it says "from code - missing" or something like that. Delete the property. Note that you will loose all data saved to that local block.

Edited, Jun 26, 2020 16:34
Scott Reed - Jun 26, 2020 16:25
Yep, I've already said this and Tobias has done it
Tomas Hensrud Gulla - Jun 26, 2020 16:29
I was not sure if you meant to delete the actual block type (the content type) or delete the property (the local block) from the page type. I think the latter will do.
Scott Reed - Jun 26, 2020 16:31
I'd personally do both to keep it in line with the code, Tobias sorted is tho which is the main thing
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.