Error When Using Primitive Zip Block

How to reproduce:

  1. Start a new :snap: project.
  2. Create a custom block using the zip block (found in some of the primitive definitions or in dev mode). Here is my example:
  3. Save your project (to the cloud/your computer).
  4. Reopen the project.
  5. Make a minor change (e.g. add a random block to the scripting area).
  6. Save the project again.
  7. Reopen your latest version. Try running your block.
  8. Look inside:
  9. As you can see, the zip block and everything in it has been replaced by an "Undefined!" block. I looked at the XML code, and it switches from considering the zip block a primitive to a custom block when the error is introduced.
  10. To fix the problem, simply restore to the version you had before it got messed up - and then import the list comprehension library. Then you can even uncheck "in palette" for the zip block if you want - but most importantly you can save your project without any trouble.

I came across this problem when trying to hyperize a library of blocks I had made. I added a block after doing this (in my next session), and then whatever I did - any changes I made after that point - could not be saved without losing many of my block definitions. I did not realize this, and proceeded to make some progress, only to have my new version be useless. Thankfully, I was able to discover the problem (using a tool to compare the xml files) and solve it reasonably easily. But I still had to redo the work I had lost (which was, thankfully, not very much). So, please fix this problem ASAP (before anyone else gets messed up by it). Thanks!

This is because i'm pretty sure its missing the <> PRIMITIVE block, and I actually reported this a while ago but the thread was ignored by the developers. Minor ZIP block changes - #3 by ego-lay_atman-bay

That's a different issue. This issue is that the primitive block is not saving as a primitive block, instead a custom block that doesn't exist in the project. Your issue was about how the library block is now obsolete because it is now a primitive.

However that may actually be the case, the primitive doesn't have a <t> primitive [ V] block in the definition, so snap treats it as a custom block.

But the library shouldn't be removed until this bug is fixed - I needed it to solve my issue (alright, I could have created a custom block named "zip (fun)..." and copied the definition over from the primitive, but that would've been more work).

Edit: Maybe I should try seeing whether that fixes it!
Edit2: The edited zip block definition won't save with the project, so I can't tell.

thats what I was thinking.