• Resolved fbleidt

    (@fbleidt)


    Hi,
    great plugin!

    I use a grid gallery in a block template.
    Everything works fine, but after selecting the images for the gallery in the gutenberg block, I have to reload the gallery before publishing my post.
    If I don’t reload the gallery, it doesn’t show up in frontend, attended by error “this.galleryData.itemsMetaDataCollection”.

    The site is on local server yet, sorry.

    Any ideas, how to fix it?

    Maybe firing the gallery reload programmatically could be a workaround?

    Thanks and blessings.

    Felix

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author GalleryCreator

    (@gallerycreator)

    Hello,
    Sorry, I don’t understand what you mean when you talk about a block template.

    Thread Starter fbleidt

    (@fbleidt)

    Hi,
    thanks for your reply.

    I load a (I thought it is called like this) block template, to have predefined Gutenberg blocks in a post. The part of SimpLy is this one:

    		        [ 'pgcsimplygalleryblock/grid',
    		            [
    		                'copyRProtection' => false,
    		                'sharePinterest' => false,
    		                'sliderItemDownload' => false,
    		                'shareCopyLink' => false,
    		                'thumbClickAction' => 'useLightbox',
    		                'collectionColumns' => 4,
    		                'thumbSpacing' => 30,
    		                'externalLink' => false,
    		                'captions' => false,
    		                'collectionThumbSubMenuDownload' => false,
    		                'galleryType' => 'pgc_sgb_grid',
    		                'align' => 'full',
    						'className' => 'hit-gallery',
    		            ],
    		        ],
    

    It loads an empty SimpLy-block in Gutenberg. I can fill it, but the problem is like described in first post.
    I know that it isn’t the way a SimpLy-Block is used usual, but maybe there’s a chance.
    As I said, when I reload the gallery before I publish the post, everything works fine. For me, it isn’t a big deal, but I try to make it for dummies, so my other publishers can’t create faults.

    Maybe you have an idea. One way could be firing the “reload”-function, before saving the post.

    Thank you!

    Plugin Author GalleryCreator

    (@gallerycreator)

    Gallery blocks are dynamic.
    Now you are publishing a gallery, which, in principle, should not go to the frontend.
    But for experiment try add images => [] to block attributes.

    Your task is clear to me and I am ready to help you, but it may be necessary to change something else. It would have been better to have a site for experimentation on the global network rather than locally

    Thread Starter fbleidt

    (@fbleidt)

    Thank you.
    Unfortunately adding images => [] to the block attributes doesn’t change anything.

    I know it would be better to have the site online. I appreciate that you’re ready to help me. Tell me what you need to get a view into it and I will give it to you.

    When I’m adding images to a new gallery in a new post, I can see in the Code, that everything is set correctly. Data-ID is set to every image. Data-link too. It seems to me, that one action isn’t fired, that normally is fired when inserting a new gallery-block by hand.

    Thread Starter fbleidt

    (@fbleidt)

    HAAAAHAAA!

    I got it!

    Adding 'itemsMetaDataCollection' => [] to the block attributes did the job!

    Thank you that much for delivering the idea!

    Have a good time!

    Plugin Author GalleryCreator

    (@gallerycreator)

    Very good!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Gallery doesn’t load until reloaded in editor’ is closed to new replies.