Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Dec 2006
    Location
    Seligman, MO U.S.A.
    Posts
    2,101
    Plugin Contributions
    5

    Default Extra spacing with SQL export/import

    I've got a problem that I hope somebody can help me with. I've got to restore product listings with an SQL backup. Everything works fine, except in the product descriptions, where every line break or paragraph break should be, there's like double to triple the normal space. Is there a quick and easy way to fix this? I've exported/imported the table in every format that phpMyAdmin lets me do it in, also zipped and gzipped, and it's the same every time.
    Any ideas?
    Teach them to shop and they will shop today;
    Teach them to Zen and they will OWN a shop tomorrow!

  2. #2
    Join Date
    Dec 2006
    Location
    Seligman, MO U.S.A.
    Posts
    2,101
    Plugin Contributions
    5

    Default Re: Extra spacing with SQL export/import

    Hmmm. Nobody? DrByte, you have any idea how to solve this?
    Teach them to shop and they will shop today;
    Teach them to Zen and they will OWN a shop tomorrow!

  3. #3
    Join Date
    Mar 2008
    Location
    Cape Town & London (depends on the season)
    Posts
    2,975
    Plugin Contributions
    0

    Default Re: Extra spacing with SQL export/import

    Product descriptions are stored as HTML in the database, so whatever is HTML formatted there will render on your browser.

    What you may care to do is "clip" a copy of a particular product description HTML off one of those data dumps you did - and then "paste" it into a HTML Editor to see how the browser is interpreting it.

    If you're getting too many line / paragraph breaks, it could be an excessive quantity of <BR /> tags, or <P> tags.

    You may also have some settings in your stylesheet that affect body text, so check your CSS too.

  4. #4
    Join Date
    Dec 2006
    Location
    Seligman, MO U.S.A.
    Posts
    2,101
    Plugin Contributions
    5

    Default Re: Extra spacing with SQL export/import

    Fairestcape, Thanks for the reply. Yes, there IS an exceptional number of <br>'s and <p>'s in there, as stated in my original post (where every line break or paragraph break should be, there's like double to triple the normal space). That's the problem. I was just needing to know why they're being inserted in there, and how to stop this from happening. I've done this countless times, and have NEVER had this problem. But this one has got me pulling hair, and I'm 40 this year............I don't have the hair to spare............

    You know, in the css, I CAN put ".biggerText p{font-size: 0.2em;}", and that DOES seem to take the extra space away, but then on other pages, the text is "microscopic", which is ALL controlled by the same div. I just don't get it.

    Anybody wanna take a look, please pm me for the URL, as this is for a client, and I really don't feel comfortable posting it in an "open" forum.

    Thanks.
    Teach them to shop and they will shop today;
    Teach them to Zen and they will OWN a shop tomorrow!

  5. #5
    Join Date
    Mar 2008
    Location
    Cape Town & London (depends on the season)
    Posts
    2,975
    Plugin Contributions
    0

    Default Re: Extra spacing with SQL export/import

    Try this with a TEST selection of products:-

    1. Use EasyPop to EXPORT your product data (standard EP export - to your temp folder, which you then FTP back to your local drive).

    2. Open up MS Excel (or OpenOffice equivalent if you use it).

    3. IMPORT the EasyPop .txt file into the spreadsheet.

    4. Now you have your easypop file nicely displayed in the spreadsheet.

    5. Delete ALL but 5 rows of product data (choose to keep product data that typically represents your <P> and <BR> problem).

    6. Open up MS Word... (yes... MS Word !)

    7. Go back to spreadsheet.

    8. Highlight the column - v_products_description_1 (probably column D) and "copy" it to clipboard.

    9. Toggle to MS Word and "paste" - you now have your column in MS Word, and can use its superior "replace" function.

    10. Using search + replace, find instances of <P> that you can replace with "nothing" (you're basically deleting them).

    11. When you've gotten rid of the excess <P> and <BR>, HIGLIGHT the whole column in MS Word, copy, then toggle to Excel and "paste" over the original column of the same name.

    12. Save as tab-delimited TXT.

    13. Make a NOTE of the products that will be changed when you EasyPop this test file back to the dbase.

    14. EasyPop upload and insert into dbase in the usual EasyPop manner.

    15. Call up the products you changed in this test run to see if the layout is better now.

    If this works, then it's one way of getting rid of the excessive tags. Excel "replace" function doesn't work well - thats why I "port" the affected column over to Word, edit it there, then port back to Excel.

  6. #6
    Join Date
    Dec 2006
    Location
    Seligman, MO U.S.A.
    Posts
    2,101
    Plugin Contributions
    5

    Default Re: Extra spacing with SQL export/import

    Wow! Sounds like a lot, but I'll sure give it a shot. Anything at this point. I'll let you know how it went.
    Teach them to shop and they will shop today;
    Teach them to Zen and they will OWN a shop tomorrow!

  7. #7
    Join Date
    Mar 2008
    Location
    Cape Town & London (depends on the season)
    Posts
    2,975
    Plugin Contributions
    0

    Default Re: Extra spacing with SQL export/import

    I can't see any logical reason why additional <P> and <BR> tags would be inserted as a consequence an easypop upload (or a SQL query for that matter) - afterall, the dbase does not know it's html - it's just data, for goodness sakes!

    I do scores of EP uploads each month - all of them with product description data that's full of HTML tags...

    ... admittedly, I keep these tags very simple - usually restricting them to BOLD <b>, Bulleted Lists <ul> <li>, Italic <em>, Line break <br> and Paragraph <p>.

    How "complex" is the HTML in your product descriptions? There is an "outside" chance that if it's overly-complex or detailed, ZC "re-writes" some of it, but we'd need DrByte to confirm if that's true!

  8. #8
    Join Date
    Dec 2006
    Location
    Seligman, MO U.S.A.
    Posts
    2,101
    Plugin Contributions
    5

    Default Re: Extra spacing with SQL export/import

    Well, I never used Easy Populate to do anything. I just use phpMyAdmin and mySQL to do everything, because I've heard a lot of bad stuff about EZP. Everything was exported/imported in SQL form (and every other way, but came back around to this), gzipped, and NEVER extracted or opened. That's why I can't understand where this extra space is coming from. I just don't make since.
    Teach them to shop and they will shop today;
    Teach them to Zen and they will OWN a shop tomorrow!

  9. #9
    Join Date
    Dec 2006
    Location
    Seligman, MO U.S.A.
    Posts
    2,101
    Plugin Contributions
    5

    Default Re: Extra spacing with SQL export/import

    Well, Fairestcape, I think I found the problem. Seems that everywhere that there's a problem, I'm finding (in the product description) this "mso-spacerun", which in turn, is also giving me css validation errors. If you search for "mso-spacerun", you'll find NOTHING but sites with this in their html. I finally searched for "mso properties" and found that this is coming from Microsoft Office (should have known), which I think my client uses to write his product descriptions with.

    Now, in knowing all this, is there a way to get rid of all that at one time, or will all the "offending" product descriptions have to be re-written to straighten all this out?
    Teach them to shop and they will shop today;
    Teach them to Zen and they will OWN a shop tomorrow!

  10. #10
    Join Date
    Mar 2008
    Location
    Cape Town & London (depends on the season)
    Posts
    2,975
    Plugin Contributions
    0

    Default Re: Extra spacing with SQL export/import

    Aha ! I too have a client who insists on writing the product descriptions in MSWord, then saving it as "html", then grabbing the code and pastes that into HTMLArea.

    It wreaks havoc!

    I don't know of any rapid way of removing the unwanted MS tags. If it think of one, I'll let you know.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Problem with SQL import
    By tragosina in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 18 Dec 2011, 03:19 PM
  2. Need help with import a large SQL database
    By shahram in forum General Questions
    Replies: 0
    Last Post: 30 Dec 2009, 11:24 AM
  3. Newsletter module with import / export feature ?
    By Amit001 in forum General Questions
    Replies: 1
    Last Post: 10 Sep 2009, 06:25 PM
  4. problem with sql export
    By metalball in forum Installing on a Linux/Unix Server
    Replies: 0
    Last Post: 11 Aug 2009, 10:47 PM
  5. Error with SQL database import
    By LadySyren in forum General Questions
    Replies: 3
    Last Post: 26 Dec 2006, 03:21 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg