• Resolved lexy2345

    (@lexy2345)


    After importing the image titles <img title=”…”> are missing in posts. However the titles are present in the media library.

    In the imported WXR file (created in WP 3.1.2) the image titles are present in the posts texts.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Are the image tags completely missing or are the contents of the title attributes missing? Or something else completely?

    If you switch to HTML view in the editor on a post which is supposed to have an image what does the HTML img tag look like if it’s there? What exactly is wrong about it, some examples of before and after import.

    Thread Starter lexy2345

    (@lexy2345)

    Other tags are correct. Everything else looks good. Here are the examples.

    SOURCE BLOG

    [caption id="attachment_1658" align="alignleft" width="150" caption="Anschluss an Regenfallrohr mit Speedy"]<a href="http://www.source.de/wp-content/uploads/2011/04/PICT1865_800x600.jpg"><img class="size-thumbnail wp-image-1658 " title="Anschluss an Regenfallrohr mit dem Speedy Regensammler" src="http://www.source.de/wp-content/uploads/2011/04/PICT1865_800x600-150x150.jpg" alt="Anschluss an Regenfallrohr mit dem Speedy Regensammler" width="150" height="150" /></a>[/caption]

    TARGET BLOG (after import)

    [caption id="attachment_1658" align="alignleft" width="150" caption="Anschluss an Regenfallrohr mit Speedy"]<a href="http://www.target.de/baublog/files/2011/04/PICT1865_800x600.jpg"><img class="size-thumbnail wp-image-1658 " src="http://www.target.de/baublog/files/2011/04/PICT1865_800x600-150x150.jpg" alt="Anschluss an Regenfallrohr mit dem Speedy Regensammler" width="150" height="150" /></a>[/caption]

    Thread Starter lexy2345

    (@lexy2345)

    After some debugging I found the solution. In wp-includes/kses.php I allowed title as attribute on image tag. Now the title tag doesn’t disappear after import.

    'img' => array(
    			'alt' => array (),
    			'align' => array (),
    			'border' => array (),
    			'class' => array (),
    			'height' => array (),
    			'hspace' => array (),
    			'longdesc' => array (),
    			'vspace' => array (),
    			'src' => array (),
    			'style' => array (),
    			'title' => array (),
    			'width' => array ()),
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: WordPress Importer] Image titles not restored in posts’ is closed to new replies.