wp-shortcake / shortcake

Shortcake makes using WordPress shortcodes a piece of cake.
GNU General Public License v2.0
665 stars 143 forks source link

Editing shortcode with multiple images #781

Open parakedista opened 6 years ago

parakedista commented 6 years ago

We have a shortcode that has multiple images alongside other information related to each of the images.

When we edit the shortcode if we change only one image, or change to fresh images that aren't already on the shortcode, everything works as it is supposed to. But when we change more than one image and the "new" images are already in the shortcode, it will only save the last image updated, discarding any other that has been changed.

Just a quick example:

The original shortcode: Image Position 1 - Image A Image Position 2 - Image B Image Position 3 - Image C

If we change Image Position 2 to be Image D, everything works fine. If we change Image Position 1 to be Image E and Image Position 3 to be Image F, everything also works fine. If we change Image Position 1 to be Image C and Image Position 3 to be Image A, it won't work as it is supposed and Image Position 1 will be kept with Image A.

We have checked that in version 0.7.0 of the plugin everything works as it is supposed, but that version has the issue of duplicating the shortcode when editing it, so it isn't a solution to downgrade to that version.