Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter Torsten Landsiedel

    (@zodiac1978)

    Can you verify you’re on the latest version of the Cloner

    Yes, very sure. Latest (and only) version used is 3.0.5.4. It’s a very fresh installation. Just a few days old.

    These plugins are used and activated network wide:
    Authenticator (disabled)
    BackWPup
    Child-Theme-Check
    Contact Form 7
    NS Cloner – Site Copier
    Simple Custom CSS
    TablePress

    I tried with your fix and all other plugins deactivated. It still does not work. The strange thing is, that I can create sites containing dashes within WP.

    Do you have any more ideas?

    All the best,
    Torsten

    Thread Starter Torsten Landsiedel

    (@zodiac1978)

    It seems that wpmu_validate_blog_signup isn’t used in WP for adding a new sites:
    https://github.com/WordPress/WordPress/blob/703d5bdc8deb17781e9c6d8f0dd7e2c6b6353885/wp-admin/network/site-new.php

    All the best,
    Torsten

    Plugin Author Never Settle

    (@neversettle)

    That’s not really the issue nor the full picture. It used to be used (and still is) in previous WP versions which we have to support. In addition, wpmu_validate_blog_signup() is also still used in adding new sites through wp-signup.php which Cloner add-ons use to allow cloning from self-serve front end user registration. The bottom line is that it’s WP Multisite’s original function for validating user input on site names for a variety of potential issues that would break a site if it was allowed to be created with an invalid name.

    Thank you for your help with the additional info! Sites with dashes used to previously work in the Cloner, but with your help we isolated the issue. Recent WP version (for whatever crazy reason) changed the text of that error message, which is the only way to isolate and bypass that specific validation issue while keeping all the others intact (invalid characters, existing site names, etc.). The meaning was identical but the wording is now slightly different.

    OLD message wording:
    “Only lowercase letters (a-z) and numbers are allowed.”

    NEW message wording:
    “Site names can only contain lowercase letters (a-z) and numbers.”

    That’s why the previous filter fix / work around we posted didn’t work any more and why it broke in the Cloner in the first place.

    In order to support older versions of WP and new versions of WP at the same time, we’ve made that validation check more generic which should find all variations by only matching on the common:
    “lowercase letters (a-z) and numbers”

    We’ve tested and verified this works and pushed an update to the Cloner now on 3.0.5.5.

    Thanks again for your help with this, and please let us know if the update does not work for you.

    All the best!

    Thread Starter Torsten Landsiedel

    (@zodiac1978)

    Unfortunately it still doesn’t work for me. I still get the mentioned error.

    I tried the new version 3.0.5.5 and the linked workaround with ine 36 changed to:

    case "Site names can only contain lowercase letters (a-z) and numbers.":

    But I cannot clone a site if the new subdomain name contains a dash.

    How can I help you to debug this problem further?

    All the best,
    Torsten

    Thread Starter Torsten Landsiedel

    (@zodiac1978)

    It works if I change the line 36 in the translated version of the error message:

    case "Website-Namen dürfen nur aus Kleinbuchstaben (a-z) und Ziffern bestehen.":

    In my case German.

    Edit: Even better, you can use the translation function:

    case __( 'Site names can only contain lowercase letters (a-z) and numbers.' );

    All the best,
    Torsten

    Plugin Author Never Settle

    (@neversettle)

    Ah! Thanks – we didn’t think to check if there might also be a potential translation issue. We’ve updated the workaround article and will also make changes to Cloner core to fact this in. Much appreciated!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Plugin does not allow hypens in site name, although WP does’ is closed to new replies.