• Resolved hrtc3c7

    (@hrtc3c7)


    Hi,

    Using user_email=>Email,first_name=>First name,last_name=>Last name for example in backend export is working fine but when I add this in shot code for frontend export, export result have all columns

    [export-users columns=”user_email,first_name,last_name”] works fine

    [export-users columns=”user_email=>Email,first_name=>First name,last_name=>Last name”] doesn’t work

    Rgds
    Hervé REMOT

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Javier Carazo

    (@carazo)

    Hi Hervé,

    Thank you for the detailed report, that helped a lot to pinpoint the issue quickly.

    You found a real bug: the columns attribute of the [export-users] shortcode was being sanitized with a whitelist that didn’t allow the = and > characters. Because of that, as soon as you used the key=>Label renaming syntax, the whole attribute was rejected and treated as empty, which made the export fall back to all columns. The backend export doesn’t have this restriction, which is why it worked fine there.

    I’ve just fixed this and released it in version 2.5.1. Please update the plugin and the renaming syntax will work the same way on the frontend shortcode as it does in the backend:

    [export-users columns="user_email=>Email,first_name=>First name,last_name=>Last name"]

    Let me know if you still run into any issue after updating.

    Best regards.

    Thread Starter hrtc3c7

    (@hrtc3c7)

    Ok thank’s.
    Waiting version 2.5.1 to update plugin, still not available in wordpress.
    I will keep you aware once update will be done.
    Rgds

    Plugin Author Javier Carazo

    (@carazo)

    @hrtc3c7,

    The new version was released 7 hours ago, you can see it in the repository.

    Refresh your transient and you will get the update notification.

    Thread Starter hrtc3c7

    (@hrtc3c7)

    Update done but i still have same issue

    Thread Starter hrtc3c7

    (@hrtc3c7)

    here is the short code i used :

    [export-users role=”subscriber” delimiter=”TAB” columns=”last_name=>Nom,first_name=>Prénom,account_status=>Statut,user_registered=>Inscription,date_expiration=>Expiration” orderby=”last_name”]

    Plugin Author Javier Carazo

    (@carazo)

    Thanks for sharing the exact shortcode — I can see the problem. Look closely at the quotes: they’re curly/smart quotes (” “) instead of straight quotes (“).

    WordPress’s shortcode parser only recognizes straight quotes (“) to delimit attributes. With curly quotes, WordPress doesn’t parse role=, columns=, delimiter=, or orderby= as valid attributes at all — it just ignores them and runs the export with default settings, which is why it looks like it “isn’t working.”

    This usually happens when the shortcode is typed or pasted from Word, Pages, Google Docs, or even the WordPress visual editor, since they all auto-convert straight quotes into curly ones (“smart quotes”).

    What to do: paste the shortcode into a plain text / code editor block (not the visual editor), and disable smart quotes/autocorrect in whatever program you used to write it. The corrected shortcode should be:

    [export-users role="subscriber" delimiter="TAB" columns="last_name=>Nom,first_name=>Prénom,account_status=>Statut,user_registered=>Inscription,date_expiration=>Expiration" orderby="last_name"]
    
    Thread Starter hrtc3c7

    (@hrtc3c7)

    No issue with the quotes, it is the correct one.
    The copy/past from wordpress to this forum has change the quotes and “=>”
    I haven’t see, sorry

    • This reply was modified 2 weeks, 1 day ago by hrtc3c7.
    • This reply was modified 2 weeks, 1 day ago by hrtc3c7.
    Thread Starter hrtc3c7

    (@hrtc3c7)

    Ok, the issue is due to accentuated character !
    i have change

    first_name=>Prénom to first_name=>Prenom

    It works as expected now

    Plugin Author Javier Carazo

    (@carazo)

    OK in the next version it will also fixed, I have included unicode characters in the regex that manage this part.

    If you’re happy with our support, we’d really appreciate it if you could leave us a rating. It helps us grow and continue improving the plugin. Thank you! 😊

Viewing 9 replies - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.