Removing items from a structure with X button collapses the whole frame


(Matthew T Cianciolo) #1

I have a structure set up like this:

   field :section_2, :structure do
     field :boxes, :matrix, display: (:grid || :structure) do
       field :title, :string
       field :body, :text
     end
   end

In my cms view if I add 3 items, save, and then go back in and click the red X to remove one of the items the whole structure box closes out and if I save none of the changes take effect. Is there something wrong with how I have set this up or is it a problem with structures?

This is what it looks like after I have pressed the red X:


(Aaron Russell) #2

Sounds like a bug. Things can get a bit hairy when you nest fields deeply, but what you’ve pasted above looks like it should work to me.

I’ll try and recreate here and let you know what I find.


(Aaron Russell) #3

Hey @pickledyamsman yeah this is a bug, I’ve raised an issue which references the offending line of code. You can probably see what’s going on.

This is a pretty easy thing to fix if anyone fancies taking this as a first PR. If not I’ll sort it out in the next few days.


(Aaron Russell) #4

Have just released version 0.10.4 which hopefully fixes this bug.


(Matthew T Cianciolo) #5

Awesome! This is working great now after the new version!