Optimize Application Removed Data Type Still Gets Referenced

Having an issue with integrating a template into an existing application. The existing application had a data type with a similar name ‘blog_post’ to a data type from the template “Blog-Post”.

This caused an issue in which any elements with a content type of “Blog-Post” when copied into the existing project gets changed to ‘blog_post’. This is despite the fact that the data type of “Blog-Post” was copied over into the existing project before any elements were.

To try and resolve this issue I deleted from the existing project the data type of ‘blog_post’ and then ran the optimize application to remove that data type from the application.

Now the result when copying and pasting elements from the template into the existing app is an error showing the data type of the elements being ‘missing data type’.

Bubble support explained that data types are associated with IDs.

Why would the ID of the data type that was removed using the optimize application still be present in the application?

Anybody else experience this before and found a way to resolve it? I have no idea what tools that might be available to us to make sure the optimize application feature works as expected and completely removes that data type because there is no way that I know of to bring it back.

This sounds like Bubble support should reconsider and escalate this to a level-up engineering resource for them to take a look at this

@eve care to chime in?

I sent in a video of me performing various tests that hopefully will make the issue more clear as my suspicion is there may have been a misunderstanding of exactly what I had done that resulted in the issue.

The tests shown in the video make things even more perplexing in regards to the original explanation of “IDs” and not being associated with names of data types.

I was told though that the support agent had spoken to the head engineer and was told this was expected behavior. That is partly why I believe there may have been a misunderstanding of the issue.

Not sure how it got resolved but it eventually was. Never had confirmation that it was a Bug, but did have an interesting round of emails from support.

After initially pushing back on the explanation I received an updated explanation

After speaking with our head engineer he confirmed that the mapping is certainly ID based and not name based. The reason you are seeing “missing data type: blog-post” is because the internal type id is the sanitized version of the initial display, (lowercase, no space, no special chars, ensured to be unique). Essentially, if the IDs don’t match, automatic mapping won’t work. You also cannot get it to work by renaming the types; they have to match from the start.

The solution to removing the missing data type error is to remap the connection to the appropriate data type.

That explanation didn’t sit well and seemed to not fully focus on the issue at hand that prompted the bug report and I replied with a question regarding how things function internally for the creation of a datatypes ID.

Questions I sent along

  1. So once I’ve copied and pasted the datatype from my template, my client’s app will have one ID of ‘blogpost’ and a second ID of ‘blogpost1’?

  2. In this case, if I change a datatype from “Blog-Post” that initially had the ID set to ‘blogpost’, to a label of “Sea-Creatures” the ID would remain set to ‘blogpost’?

  3. Also, am I correct to assume that the application still saves the IDs of data types that are removed from the application via the ‘optimize-application’ feature?

The response to those questions

  1. The special characters aren’t stripped out, they’re replaced with underscore, so first one would be blog_post, pasted thing would be blog_post1

  2. Yes, correct.

  3. No, optimize app removes the ability to restore types in which case the ids are removed, and you restart unique checks from scratch because the previous deleted types’ ids won’t be there anymore.

The question and answer of number 3 was exactly where my issue was related and why I submitted a bug report. After deleting the datatype and using the remove datatype function within ‘optimize application’ feature I still got the ‘missing datatype’ issue.

Seems they have fixed it and now I no longer have that issue of ‘missing datatype’.

Glad I didn’t just rely on the first ‘solution’ and spend hours remapping every instance of ‘missing datatype’.

Hopefully this information will help others fully understand the implications of their naming conventions used for datatypes, as well as what to expect when changing the name of the datatype as it may relate to integrating features from other applications.


Above and beyond the call of duty @boston85719

Very illustrative and worthwhile knowing about this!

Thanks for sharing! :+1:t2:

1 Like