All my text is appearing as a caption for my image

  • I am manually transferring posts from my old blog to my new one. I have already done a few successfully, but today am having trouble.

    I am copying and pasting the text into a new post. Then, immediately above the first line of text, I am adding an image. I want the border that you get around an image if you add a caption, but without actually having a caption, so I am just space in the caption field.

    After the image, I have inserted the ‘Read More’ thingy and the text that I have copied in appears below that. It looks fine in the Visual Edit screen, but when I preview the post, all the text I have entered is showing as a caption for the image above. I have tried deleting the text from the caption and re-entering – no joy. I have tried deleting the image and re-entering – no joy.

    Help!

    The blog I need help with is: (visible only to logged in users)

  • First do notice that you can not have two blogs having same content. This is against TOS. Your blog can be suspended.
    Are you adding caption directly from HTML code?
    If so then carefully close the Caption shortcodes.Add[caption at the start of image HTML code and [/caption] at the end where your image ends.

  • I’m not intending to maintain two blogs with the same content – I am discontinuing the old one and have started a new one with WordPress. I am just trying to get the old content onto the new blog so I have it all in one place. As transferring from one provider to WP is something that WP support (although not for my old provider), I presume this is not a problem?

    I’m not adding the caption from HTML code – I’m very new to this and don’t know enough about HTML to know how it works. I can see how I can remove the text from the image caption in HTML but what I can’t work out is how to get that same text back into my post as actual text.

    I’ve also noticed that the second image I am adding further down the post (again, looks right in Visual Editor) disappears when I preview the post.

  • I can see how I can remove the text from the image caption in HTML but what I can’t work out is how to get that same text back into my post as actual text.

    Here’s the error. When you copy/paste material from other sites. You can cut (ctrl + x) and paste (ctrl + v) (or by right click) the ‘selected’ text from the caption area to normal field.

  • What you’re describing means messed-up code. You need to publish the post so we can check its code and see what exactly is wrong.

  • I’ve also noticed that the second image I am adding further down the post (again, looks right in Visual Editor) disappears when I preview the post.

    Make it sure your image is one of them
    jpg
    jpeg
    png
    gif

  • @hnsaifi: Please take note of my reply and stop making irrelevant suggestions.

  • Sorry I didn’t refresh to see your comment there.

  • OK – I’ll publish ASAP (not able to at the moment)

  • I’ve published the dodgy post – called ‘Test post – please ignore’!

    Incidentally, I’ve tried copying & pasting the text from two sources – one is the old blog (through Safari browser) and the second is directly from the iWeb software. Five of the other six posts on the blog were copied successfully (although I can’t remember from which source), I just can’t understand what has gone wrong with this one.

  • Post the link of the test post here.

  • Things to note:
    a) Never paste from another source into the Visual editor: you introduce wrong code. Paste into the HTML editor, then switch to Visual if you need to use the formatting tools.
    b) When you edit a post in the Visual editor, make sure the Format tool (row 2 tool 1) is set to paragraph.
    c) The HTML post editor doesn’t contain the actual code of captioned images: it contains a WP-specific formula called a shortcode, and the shortcode isn’t editable. If a captioned image gets messed up, there’s nothing you can do to correct it.

    The code of your post includes various bits of wrong or unnecessary code. Instead of telling you what to delete and what to change, the easiest solution is:
    1. Copy all the text of the post from the front page of your blog.
    2. Select all in the HTML editor, delete, paste copied text. Click Update, just in case.
    3. Redo the email link, insert the image, Update.

  • Great – I entered everything through HTML and it works.

    Many thanks for your help.

  • You’re welcome!

  • So, that post worked.

    Now I’ve moved onto a new post. I’m not copying the text from anywhere, I’m typing it in. Again, started in Visual Editor, insert image (with space as caption so I get the border), Read More thingy followed by text and more images.

    The text I typed in is once again appearing as the caption for the first image. So I delete everything from HTML editor, type the text again, insert all the images again. Same thing happens and the formatting of all the following images is wrong, even though I selected centred.

    I notice that when I enter an image with a space as a caption, HTML editor doesn’t show image ID, it starts with caption ID. Is that the problem? Do I just need to give up on the idea of my photos having a border and forget the caption?

  • “I notice that when I enter an image with a space as a caption, HTML editor doesn’t show image ID, it starts with caption ID. Is that the problem?”
    No. When you insert a captioned image, the HTML editor will display this:
    [caption id=ETC ETC ETC ETC[/caption]
    That’s the captioned image shortcode, no matter what the caption is.

    The most likely cause of the issue is that you’re trying to add the rest while the cursor is still inside the image caption. In general, it’s safer to add captioned images after you’ve added everything else.

    If you don’t manage to sort this out, I can give you a code that will produce the border you like.

  • Thanks justpi. I’m pretty certain I’m not leaving the cursor in the image caption – I’ve tried a couple of times typing/copying my text before adding any images. What confuses me is that Visual Editor & HTML Editor both look right initially – it is only when I click on Preview that it all goes wrong and when I then go back to HTML Editor, it has changed. Although I’m new to this, I can see that the code initially includes caption = ” ” but then changes to include all of my text!

    Anyway, it seems to work if I don’t use a space for a caption (not sure what will happen when I do want an actual caption!) but would be grateful if you could give me the code for the border. And pretty simple instructions on how to use it!

    Thanks

  • 1) If I do exactly what you’re saying, step by step, in the same order, I don’t get the same issue. So, since I can’t replicate the issue in my tests blog, and since I’m not there with you, I can’t be sure what’s causing it: I’m only making suggestions based on my knowledge of what the mistakes I saw in your code mean and what usually goes wrong with captioned images.
    Turning to a different possible culprit (since you’re saying it only happens after previewing): what browser and version are you using?

    2) Before I give you the code: The images you have inserted link to the real-size original when clicked. Is that intentional or not? It’s not really useful, as the originals aren’t significantly larger. If the available options aren’t clear to you, check this post:

    Uploading and inserting images: the three (plus one) link options

  • Hi justpi.

    I’m not complaining about you making suggestions – I’m very grateful that you are. The frustrating thing is that I can’t always replicate the issue – when I posted my follow up issue a couple of days ago, I had just posted with no problems at all. The next post had problems, even though I’m pretty certain I did the same thing. If I can’t always replicate the problem, I’m not surprised that you can’t!

    Was it intentional that the photos link to the real-size original? Nope! However, having looked at the options (thanks for the links) and although it isn’t a huge difference in size, I think it is enough for some people (I’m thinking older parents here!) to see a bit more detail. Also, although the article you linked to said that the default is none and your previous settings are remembered, my default seems to be the File URL (which is why they are like that in the first place) and the link URL settings are not remembered for the next image if I change them (even though alignment and size settings are). So, long story short, I’m going to leave it that way!

  • Ok! You missed the other question: what browser and version are you using?

  • The topic ‘All my text is appearing as a caption for my image’ is closed to new replies.