• Resolved b71b71

    (@b71b71)


    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 8 replies - 1 through 8 (of 8 total)
  • Plugin Support Hannah S.L.

    (@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?

    Thread Starter b71b71

    (@b71b71)

    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.L.

    (@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?

    Thread Starter b71b71

    (@b71b71)

    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 ??

    Plugin Support Hannah S.L.

    (@fernashes)

    Automattic Happiness Engineer

    Hey there @b71b71 – thanks for that explanation and your patience!

    I followed the same steps on my test site, to see if I could get this to happen on my end. Everything worked correctly and there was no issue with slugs.

    I tried a second test where I created a product with the attribute “hpio-hrio-differential-pairs-12-gbps-pair” – everything still worked correctly.

    This is going to require some more testing to figure out where things are going wrong. ??

    Some follow-up questions:

    * When you import, are you overwriting existing products, or creating new products? Does this problem only happen with new products, or when overwriting existing products?
    * You mentioned two errors on import – is this only happening with two of the products, rather than all of them?
    * Is this happening with a specific product type, for example always with variable products?
    * Could you please take just a few lines of your CSV export, confirm that it’s having problems with the slug, and then share it? You can paste the URL here. I’d like to test your file on my local site.

    Could you please share a copy of your site’s System Status? You can find it via WooCommerce > Status.

    Select “Get system report” and then “Copy for support”.? Once you’ve done that, paste it here in your response. You’re welcome to remove identifying information such as the site URL and/or name.

    Plugin Support con

    (@conschneider)

    Engineer

    Hi there,

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

    Kind regards,

    Thread Starter b71b71

    (@b71b71)

    Hello,

    Please don’t I was on parental leave, I just came back and I was about to test what Hannah advice me. Could you let the post ON please ?

    Thanks in advance,

    Thread Starter b71b71

    (@b71b71)

    Hello @fernashes Hannah S,

    Thanks to you for your patience. I have finally the time to answer, sorry for the delay.

    ? The problem happens in both case : in creating new product and in overwriting one.
    ? By now, I have only try with 1 or 2 products. I mainly focused on 1 product. The idea is when one product works, I can work on all other products.
    ? Actually, I only use the “simple product”
    ? Please find the CSV here : https://we.tl/t-uqBbYKf1tX
    ? Please find the Woocommerce status here :

    ————————————————————-

    ### WordPress Environment ###

    WC Version: 3.5.7
    Log Directory Writable: ?
    WP Version: ? 5.2 – There is a newer version of WordPress available (5.2.1)
    WP Multisite: –
    WP Memory Limit: 512 MB
    WP Debug Mode: –
    WP Cron: ?
    Language: fr_FR
    External object cache: –

    ### Server Environment ###

    Server Info: Apache
    PHP Version: 7.0.33 – We recommend using PHP version 7.2 or above for greater performance and security. How to update your PHP version
    PHP Post Max Size: 130 MB
    PHP Time Limit: 300
    PHP Max Input Vars: 16000
    cURL Version: 7.38.0
    OpenSSL/1.0.1t

    SUHOSIN Installed: –
    MySQL Version: 5.6.43-log
    Max Upload Size: 128 MB
    Default Timezone is UTC: ?
    fsockopen/cURL: ?
    SoapClient: ?
    DOMDocument: ?
    GZip: ?
    Multibyte String: ?
    Remote Post: ?
    Remote Get: ?

    ### Database ###

    WC Database Version: 3.5.7
    WC Database Prefix: wp_
    MaxMind GeoIP Database: ?
    Total Database Size: 10.39MB
    Database Data Size: 10.17MB
    Database Index Size: 0.22MB
    wp_woocommerce_sessions: Data: 0.00MB + Index: 0.00MB
    wp_woocommerce_api_keys: Data: 0.00MB + Index: 0.00MB
    wp_woocommerce_attribute_taxonomies: Data: 0.00MB + Index: 0.00MB
    wp_woocommerce_downloadable_product_permissions: Data: 0.00MB + Index: 0.00MB
    wp_woocommerce_order_items: Data: 0.00MB + Index: 0.00MB
    wp_woocommerce_order_itemmeta: Data: 0.00MB + Index: 0.00MB
    wp_woocommerce_tax_rates: Data: 0.00MB + Index: 0.00MB
    wp_woocommerce_tax_rate_locations: Data: 0.00MB + Index: 0.00MB
    wp_woocommerce_shipping_zones: Data: 0.00MB + Index: 0.00MB
    wp_woocommerce_shipping_zone_locations: Data: 0.00MB + Index: 0.00MB
    wp_woocommerce_shipping_zone_methods: Data: 0.00MB + Index: 0.00MB
    wp_woocommerce_payment_tokens: Data: 0.00MB + Index: 0.00MB
    wp_woocommerce_payment_tokenmeta: Data: 0.00MB + Index: 0.00MB
    wp_woocommerce_log: Data: 0.00MB + Index: 0.00MB
    wp_commentmeta: Data: 0.00MB + Index: 0.00MB
    wp_comments: Data: 0.00MB + Index: 0.01MB
    wp_et_bloom_stats: Data: 0.00MB + Index: 0.00MB
    wp_et_social_stats: Data: 0.00MB + Index: 0.00MB
    wp_links: Data: 0.00MB + Index: 0.00MB
    wp_options: Data: 0.39MB + Index: 0.04MB
    wp_postmeta: Data: 0.16MB + Index: 0.04MB
    wp_posts: Data: 9.55MB + Index: 0.04MB
    wp_termmeta: Data: 0.01MB + Index: 0.02MB
    wp_terms: Data: 0.01MB + Index: 0.02MB
    wp_term_relationships: Data: 0.00MB + Index: 0.01MB
    wp_term_taxonomy: Data: 0.01MB + Index: 0.01MB
    wp_usermeta: Data: 0.02MB + Index: 0.01MB
    wp_users: Data: 0.00MB + Index: 0.01MB
    wp_wc_download_log: Data: 0.00MB + Index: 0.00MB
    wp_wc_webhooks: Data: 0.00MB + Index: 0.00MB
    wp_yoast_seo_links: Data: 0.01MB + Index: 0.00MB
    wp_yoast_seo_meta: Data: 0.01MB + Index: 0.01MB

    ### Post Type Counts ###

    attachment: 67
    attribute_group: 10
    custom_css: 1
    et_pb_layout: 13
    nav_menu_item: 35
    page: 25
    post: 2
    product: 1
    revision: 190

    ### Security ###

    Secure connection (HTTPS): ?
    Hide errors from visitors: ?

    ### Active Plugins (11) ###

    Redux Framework: by Team Redux – 3.6.15
    Bloom: by Elegant Themes – 1.3.10
    Divi Builder: by Elegant Themes – 2.21.1
    Jetpack by WordPress.com: by Automattic – 7.1.1
    Monarch Plugin: by Elegant Themes – 1.4.12
    Slick Sitemap: by Pengbo Tang – 2.0.0
    WooCommerce Blocks: by Automattic – 1.4.0
    WooCommerce Group Attributes: by weLaunch – 1.3.7 – Not tested with the active version of WooCommerce
    WooCommerce Services: by Automattic – 1.19.0 – 1.20.0 is available
    WooCommerce: by Automattic – 3.5.7 – 3.6.4 is available
    Yoast SEO: by Team Yoast – 10.0.1

    ### Settings ###

    API Enabled: –
    Force SSL: –
    Currency: EUR (€)
    Currency Position: left
    Thousand Separator:
    Decimal Separator: ,
    Number of Decimals: 2
    Taxonomies: Product Types: external (external)
    grouped (grouped)
    simple (simple)
    variable (variable)

    Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)
    exclude-from-search (exclude-from-search)
    featured (featured)
    outofstock (outofstock)
    rated-1 (rated-1)
    rated-2 (rated-2)
    rated-3 (rated-3)
    rated-4 (rated-4)
    rated-5 (rated-5)

    ### WC Pages ###

    Shop base: #163 – /shop/
    Cart: #164 – /cart/
    Checkout: #165 – /checkout/
    My account: #166 – /my-account/
    Terms and conditions: ? Page not set

    ### Theme ###

    Name: Divi Enfant par WP Marmite
    Version: 1.0
    Author URL: https://wpmarmite.com
    Child Theme: ?
    Parent Theme Name: Divi
    Parent Theme Version: 3.21.1
    Parent Theme Author URL: https://www.elegantthemes.com
    WooCommerce Support: ?

    ### Templates ###

    Overrides: /home/bagjzfvv/www/image-matters/wp-content/plugins/woocommerce-group-attributes/public/partials/woocommerce-group-attributes-output-layout-1.php version 2.1.3 is out of date. The core version is 3.1.0
    Outdated Templates: ?

    ————————————————————-

    Thanks again for your help,
    Best regards,

    Julien

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Slug “” is too long (28 characters max). Shorten it,’ is closed to new replies.