Support » Plugin: Media Credit » HTML changes when updating posts

  • Resolved Joseph


    When I insert an image into a post with a caption, using the visual editor. When I switch to the HTML editor, this is the code that I see:

    [caption id="attachment_109" align="aligncenter" width="300" caption="Dating a Kardashian = 18,000 automatic followers on Twitter"][media-credit name="" align="aligncenter" width="300"]<img class="size-full wp-image-109" title="Reggie Bush and Kim Kardashian" src="" alt="Reggie Bush and Kim Kardashian" width="300" height="278" />[/media-credit][/caption]

    That block of code works for me. But when I save the post, that block of code changes into this:

    <div class="mceTemp mceIEcenter">[media-credit name="" align="aligncenter" width="300"]<img class="size-full wp-image-109" title="Reggie Bush and Kim Kardashian" src="" alt="Reggie Bush and Kim Kardashian" width="300" height="278" />[/media-credit]<dl id="attachment_109" class="wp-caption aligncenter" style="width: 310px;"><dt class="wp-caption-dt"></dt><dd class="wp-caption-dd">Dating a Kardashian = 18,000 automatic followers on Twitter</dd></dl></div>

    Obviously, I don’t want the code to change. I’m wondering why it’s changing, and what can be done to stop it.

    I’m using MC version 1.1.2, and WordPress version 3.2.1.

    Any help is greatly appreciated. Thanks!

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi Joseph,

    I’ll try my best to look into and resolve the problem you’re seeing. But in the meantime, I would suggest trying to stick to the HTML editor while using Media Credit. While you may be able to use the Visual editor, and may even be able to switch back and forth in some cases, it’s clear from this (and other bug reports) that there are bugs around it.

    By the way, does the post display poorly or inaccurately when it has the wrapping div as posted above? Do you see any issues with the Visual editor (or switching back and forth) when not including a caption?


    Hey Scott,

    Thanks for the reply. From what I observe…

    Nothing else is affected when using a caption and credit. Just the caption and credit to the image itself.

    When using just a credit, with the caption removed, the issue seems to disappear. Switching back and forth between the visual and HTML editor doesn’t change the block of code associated with the image.

    Also, when in the HTML editor, and I paste the first block of code from my original post, saving the post doesn’t change the code. However, it changes when I switch to the visual editor. I can save the post without switching to the visual editor, and open up the post in a browser and have it display correctly.

    Hope that helps.

    Scott, has this been fixed yet?

    I didn’t have this problem until the 3.2.1 upgrade, but now it’s happening.

    The problem I have is we are using WordPress as our newsroom CMS, and there are many people along the way who edit stories, some after photos have been posted, who often have a hard time remembering to do steps before publishing, so this is messing up the alignment of all of our photos.

    I could just turn off the plugin until this is resolved, but if I did that, it would cause many other issues (such as needing to go back to all of the old photos and put photo credits in the caption).

    Any help would be greatly appreciated.




    I have also run into this issue and hope a fix is on its way. Great plugin otherwise.

    Thanks in advance.



    I have also run a similar issue. if the image is inserted while in visual mode and then the post is published then there is no problem. If the editor is switched to html mode then the code is messed up. If I try to update the posts then the code is also messed up. We never noticed this until recently so I must also agree with Statmanlouie that some change in a recent update seems to be the cause of this problem.

    Hi folks,

    Thanks all for your bug reports. It’s clear that the TinyMCE upgrade to 3.4.2 in WordPress 3.2 ( broke the Visual Editor integration work I had done. Unfortunately, I don’t have that much time, so I don’t have an ETA for a fix. It is on my mind though. If anyone else has time to investigate, patches are always welcome!


    For the short term, I’ve found the plugin still works pretty well if you use an earlier version.

    I’m running 1.0 right now, and the rogue HTML tags are not added.

    I haven’t seen any other problems so far. I’ll let you all know if I notice anything.

    I am NOT using this plugin but STILL facing the same problem. Looks like there’s a bug in WordPress 3.4.1.

    Have a look at this post to get an idea what the image captions look like.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘HTML changes when updating posts’ is closed to new replies.