default userpic

Convert line breaks all entries (imported entries)

Vote 0 Votes

Hi,

I imported entries from a Wordpress blog into movable type. Everything worked out really well, except all the paragraphs run together. If I edit an entry, change format from Rich Text to "Convert Line Breaks", then convert it back to Rich Text, the entry is fixed.

Is there a method to do this against all of the entries/pages through MovableType, or would I need to manipulate the database directly?

Reported on Movable Type 5

4 Replies

| Add a Reply
  • What I would recommend is that you connect to the database using a tool like phpmyadmin and you change the 'entry_convert_breaks' column values from "Rich Text" to "Convert Line Breaks".

    You would first play with an entry and see which value is assigned to "Rich Text" and which one to "Convert Line Breaks".

    Then you would write an SQL command which to update the 'entry_convert_breaks' column from inside the 'mt_entry' table where the 'entry_convert_breaks' is set to something, and the blog id is something, the 'entry_convert_breaks' column' will be something else...

  • Thanks for the reply Mihai.

    I was under the impression that selecting "Convert Line Breaks" performed a browser/client-side conversion to convert line breaks into

    tags. The change only takes place in the browser until you press the Update button.

    If that is the case, then a database edit would require retrieving the entry content from the database, using a regex to parse the text, and then updating the database.

    If it turns out I just have to change one column (and publish), that sounds much simpler. I can try updating it for 1-2 entries, publishing and seeing what happens.

  • You're welcome!

    I'm an experienced developer, so just trust my judgement and you would solve the problem in an effective manner ;)

    • Well this worked. Thanks for the great suggestion.

      mysql> select entry_id, entry_basename, entry_convert_breaks from mt_entry where entry_convert_breaks IS NOT NULL;
      +----------+-----------------------------+----------------------+
      | entry_id | entry_basename              | entry_convert_breaks |
      +----------+-----------------------------+----------------------+
      |      470 | allaboutjohn                | richtext             |
      |      471 | site-history                | __default__          |
      |      478 | material-things             | __default__          |
      |      534 | lentils                     | __default__          |
      |      538 | scattered                   | richtext             |
      |      539 | floor-fan                   | __default__          |
      |      548 | honeymoon-pictures          | 0                    |
      |      550 | website_maintenance         | richtext             |
      |      549 | basement-junk-and-treasures | __default__          |
      +----------+-----------------------------+----------------------+
      9 rows in set (0.00 sec)
      
      

      mysql> update mt_entry set entry_convert_breaks = "__default__" where entry_convert_breaks IS NOT NULL;

Add a Reply

If you need to share template code, replace all the "<" signs with "&lt;" or use this utility.

Forum Groups

64 196

Last Topic: movable type 5 custom fields by kljx on Mar 17, 2010

1004 3223

Last Topic: Create Offline Backup by Jackie on Mar 17, 2010

482 1976

Last Topic: ¿Any command line tool to rebuild MT? by Nicolás on Mar 16, 2010

102 360

Last Topic: Saving an entry...what is happening by jdbeast00 on Mar 12, 2010

57 127

Last Topic: Anyone using Disqus with MT5? by Jim S. on Mar 17, 2010

19 69

Last Topic: Custom main index page by Richard on Feb 7, 2010

43 172

Last Topic: by MG on Feb 20, 2010

11 22

Last Topic: Monthly Calendars Help Needed by joe leblanc on Jan 19, 2010

91 326

Last Topic: SpamLookup Keyword Filter 2.1 not work by b.n09 on Nov 17, 2009

55 206

Last Topic: URL Problems by NoSnaiL on Mar 17, 2010

code.sixapart.com

129 448

Last Topic: Action Stream for Google Buzz by jack lail on Feb 16, 2010

160 498

Last Topic: Installed custom Asset markup by spierce on Mar 15, 2010