Support » Plugin: Genesis Custom Blocks » Repeater Blocks rewriting themselves, when copied

  • Resolved aztec91

    (@aztec91)


    Hey there guys,

    I have a strange problem.

    I have a block that uses the repeater Element, to add multiple buttons.
    If I duplicate the Element in Gutenberg, the first item of any repeater will overwrite the second or the other way around. (this error happens allready in the backend)

    for example:

    1st Block:

    Button 1 (text field input): This is a Button (XYZXYZ)
    Button 2: xxx
    Button 3: xxx

    2nd Block:

    Button 1 (text field input): XYZXYZ -> 1st Block Button 1 overwritten with “XYZXYZ”
    Button 2: xxx
    Button 3: xxx

    But only if I copy and paste. If I input the same block again manually, it works just fine.

    Any Ideas what it could be?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter aztec91

    (@aztec91)

    <div class="overlay">
    		<?php
    		if ( block_rows( 'button' ) ):
    			while ( block_rows( 'button' ) ) :
    				block_row( 'button' );
    				echo "<button class=\"";
    				block_sub_field( 'class' );
    				echo " ";
    				block_sub_field( 'icon' );
    				echo "\" style=\"";
    				block_sub_field( 'popupbtn-1-xy' );
    				echo ":";
    				block_sub_field( 'popupbtn-1' );
    				echo "vh; ";
    				block_sub_field( 'popupbtn-2-xy' );
    				echo ":";
    				block_sub_field( 'popupbtn-2' );
    				echo "vw;\" onclick=\"";
    				block_sub_field( 'type' );
    				echo "('";
    				block_sub_field( 'popupbtn-src' );
    				echo "')\">";
    				block_sub_field( 'text' );
    				echo "</button>";
    			endwhile;
    		endif;
    		reset_block_rows( 'button' ); ?>
    		<?php block_field( 'html' ); ?>
        </div>

    This ist what my code looks like

    Plugin Contributor Ryan Kienstra

    (@ryankienstra)

    Hi @aztec91,
    Thanks for letting me know, that sounds like a bug. I’ll look at it.

    Thread Starter aztec91

    (@aztec91)

    Awesome, it would be perfect to have a fast solution here 🙂

    Thread Starter aztec91

    (@aztec91)

    any updates here?

    Plugin Contributor Ryan Kienstra

    (@ryankienstra)

    Hi @aztec91,
    Sorry for the delay.

    That definitely is a bug, I noticed it also.

    There’s a working fix in our repo, I’m asking to deploy it in the next several weeks.

    It’ll probably be in our next release.

    Plugin Contributor Ryan Kienstra

    (@ryankienstra)

    Hi @aztec91,
    Sorry, I couldn’t fix this, even though I told you it’d be in our next release.

    It is a bug with Genesis Custom Blocks, and it doesn’t look like this bug exists with Core blocks.

    I struggled debugging it for a few days, and don’t see a way to fix this.

    Sorry to go back on what I said.

    Thread Starter aztec91

    (@aztec91)

    Well, you tries your best. Thanks a lot. We love this Plugin. Now I Just have to Tell my Colleges that we will have to live with it.

    Kind regards
    Aztec

    Plugin Contributor Ryan Kienstra

    (@ryankienstra)

    @aztec91,
    Thanks so much, it means a lot to me that you’re using Genesis Custom Blocks. Enjoy the holidays!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Repeater Blocks rewriting themselves, when copied’ is closed to new replies.