Support » Plugin: WooCommerce » Slug “” is too long (28 characters max). Shorten it,

  • Hi everyone !

    First time I post in the forum !
    I hope someone will have the answer :p

    Here is the situation :

    I am developping a Woocommerce site with products, attributes, groups of attributes, terms, …

    When I create a product, its attributes and terms directly in wordpress, I got no problem. See “Additionnal information” TAB : https://www.b71.be/image-matters/product/im-m20

    Then, I export the CSV to have a basic database file in order to add other lines in Excel.

    Then, I export this new file in a new CSV and the issue comes when I import it in WordPress/Woocommerce.

    The fact is that my attributes names are long (I previously created Slugs shorter than 28 characters) and the import fails with this error message :

    Slug “example” is too long (28 characters max). Shorten it.

    It seems that during the importation it transform my Attributes Names into Slugs… oO so weird ! And SLugs does not appear in my CSV.

    I don’t know how to extend the maximum of 28 characters.
    Our hosting serveur is OVH and the database is in VARCHAR (200 characters max.)

    Could anyone help me πŸ™‚
    Thanks a lot !

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Hannah S.

    (@fernashes)

    Automattic Happiness Engineer

    Hey there,

    That’s an odd one! I’d definitely focus on why your attributes are being moved to the slugs field, rather than extending the slugs field. That slug is also used in the URL, which has its own limits – it’s better to keep that short.

    When you edit the file, it’s best to use Google Sheets, as it adds less formatting than Excel – that can already possibly solve your problem.

    When you edit the CSV export initially, is the slug still correct? And can you confirm that the slug is still correct when you save the file?

    Hey Hannah,

    Thank you for your answer !

    I need to precise a thing : there is no “slugs” columns in my database (neither the csv exported or imported) – I use the exact “configuration” of the database that WooCommerce give me.

    It’s me who deducted it transforms (when imported in WC) the column “Attribute Name” into something like a slug because the error message says :

    Slug “hpio-hrio-differential-pairs-12-gbps-pair” is too long (28 characters max). Shorten it, please.

    I deducted it because when I tested to shorter the Attribute Name in the CSV into something like : “Hpio Hrio” and the imported it in WC, it showed me the same error message BUT with an other Attribute Name I have recorded before (and long as well).

    So, I have just tried your idea : just export the CSV from WC, I have opened it with sublime text (Not Google Sheets – but I suppose it won’t change a thing ?), I have modified one attribute value, saved it and imported it again in WC but the error message is the same.

    I made few printscreens to help you to have a better picture : https://www.b71.be/image-matters/data/problem_name_slug_28characters_v001.jpg

    If other printscreens needed I can πŸ˜‰

    Thank you,

    Julien

    Plugin Support Hannah S.

    (@fernashes)

    Automattic Happiness Engineer

    Hey there,

    Thanks for that additional information as well as the detailed screenshot! That helps to clarify quite a bit.

    I have opened it with sublime text (Not Google Sheets – but I suppose it won’t change a thing ?),

    It’s best to not use the big spreadsheet editors, like Numbers or Excel. The next best thing is Google Sheets, and the very best is a text editor like Sublime.

    I’m still wrapping my head around exactly what’s going wrong so that I can try it out on my own site. Can you please give me a step by step approach of what you’re doing?

    Hello Hannah !

    Thanks again for your answer.

    Here is my step by step approach :

    1) I go to the page Products on WC
    2) I click above on “export”
    3) I don’t modify anything and I click on “Generate CSV”
    4) I save it on local
    5) I import it in Google Sheet
    6) I modify it : I add a new product, I change some Attributes Names
    7) I save it on local
    8) I go to my page product and click above on “import”
    9) I pick the file and do not modify anything
    10) I click on “continue”
    11) I check the map CSV fields and everything seems OK to me
    12) I click on “run the importer”
    13) It shows : “Import complete! Failed to import 2 products. View import log”
    14) I click on “View import log”
    15) Reason to failure : “Slug “hpio-hrio-differential-pairs-12-gbps-pair” is too long (28 characters max). Shorten it, please.”

    I remember a thing that you perhaps should know : I have installed a plugin to group the attributes called “WooCommerce Group Attributes”

    But it does not appear on the datasheet, just on WP/WC.

    I hope it will help !
    If screenshots needed do not hesitate !

    Thanks a lot πŸ™‚

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.