Support » Fixing WordPress » 3.5.x Gallery, still using attachments?

  • This is a question/comment on something I’ve just run into with the new Gallery system — it might be something to be fixed in future updates. I could be wrong in my assessment of the situation, so please let me know if I’m just barking up the wrong tree and missed something obvious.

    I really like the new gallery system in 3.5.x. The way it previously worked (one gallery allowed per page unless you set up some individual pages for galleries and then called them in by ID) was one of the only things I didn’t like about WordPress. It was not intuitive for non-technical web design clients. The new system is visual, easy and logical — sometimes you want to list the same media file in a gallery on two pages, or even in two galleries on the same page, this makes that possible.

    However, I just noticed while updating a client’s website which had a photo gallery, that media files attached to the post while using the previous gallery system still show up as the gallery, even if I change the ID numbers in the list of images to be shown — the gallery fails to update. I can change the number of columns, etc. effectively, but the images shown are still based on the media files attached to the page.

    It’s not too big a deal to create a new duplicate page and re-insert the gallery using the new system to ensure a clean setup, but it would be great to have the change to 3.5.x replace existing galleries with the new system and not rely on attachments to a post/page.

Viewing 3 replies - 1 through 3 (of 3 total)
  • esmi


    Forum Moderator

    [Moved to Requests & Feedback for better traction.]

    I think the issue here is backwards compatibility. If old galleries were “updated”, there could be a lot of issues for those who have multiple older galleries. What would be a good idea (in my opinion) would be a plugin that could carry out the conversion but there would still be the issue of how to decide what should be in the “new” gallery and what shouldn’t.

    It’s a nice thought, though…

    Thanks for moving my post, I wasn’t sure where to put it.

    Yeah, I understand the need for backwards compatibility. I guess what I think would be great is if you had any sort of gallery set up on any page (even if it were pulling a gallery from another page) the update would check to see which pictures were attached to a particular gallery ID and replace the original shortcode with a new shortcode including the IDs of the images that were attached, without maintaining the connection to the original attachments as “attachments” to that page.

    So even if you were originally listing three galleries on one page, the update would take those galleries and update them from:

    [gallery id="1" columns="3"] to –> [gallery columns="3" ids="163,133,234,245,246"]

    Or something like that. Maybe I’m not accounting for a particular kind of setup that would be harder to replace with the new system automatically. I guess it would have to take into account images that were previously excluded, etc. And it’s definitely possible that I’m missing something about it that makes the current way it’s handled better.

    A plugin solution would be fine, too, I’ll look into it.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘3.5.x Gallery, still using attachments?’ is closed to new replies.