• Bonjour,

    Je rencontre un problème pour utiliser la fonction wp_authenticate de wordpress.

    include(‘../../..wp_includes/pluggable.php);
    include(‘../../..wp_includes/l10n.php);
    include(‘../../..wp_includes/plugin.php);
    include(‘../../..wp_includes/formating.php);
    include(‘../../..wp_includes/class-wp-error.php);

    wp_authenticate(‘test’,’test’);
    (un utilisateur username = test , password = test a été créé)

    Ce morceau de code me retourne une erreur :

    Uncaught Error: Class “NOOP_translation’ not found in […]

    Plusieurs posts sur internet indiquaient un problème d’installation de wordpress. J’ai re-effectué l’installation mais l’erreur persiste.

    Merci d’avance à vous.

    • This topic was modified 6 years, 7 months ago by renizmy.
Viewing 8 replies - 1 through 8 (of 8 total)
  • Moderator James Huff

    (@macmanx)

    Try manually resetting your plugins (no Dashboard access required). If that resolves the issue, reactivate each one individually until you find the cause.

    If that does not resolve the issue, access your server via SFTP or FTP, or a file manager in your hosting account’s control panel (consult your hosting provider’s documentation for specifics on these), navigate to /wp-content/themes/ and rename the directory of your currently active theme. This will force the default theme to activate and hopefully rule-out a theme-specific issue (theme functions can interfere like plugins).

    Alternatively, you can find support in your native language at https://wpfr.net/support/

    Thread Starter renizmy

    (@renizmy)

    Hello,

    I didn’t pay attention. Sorry about the language.
    I tried to reinstall a new version of wordpress but I still have the same problem.
    The message says that the problem comes from the l10n class, I tried to rewrite it using the code on wordpress.org but it is then impossible to start wordrpess

    Thank you for your answer

    Moderator James Huff

    (@macmanx)

    Ok, please try what I outlined in my reply.

    Thread Starter renizmy

    (@renizmy)

    That did not solve the problem,
    I tried to install a blank version of wordpress running with XAMPP but I have the same mistake .

    Thank you for your answer

    Moderator bcworkz

    (@bcworkz)

    The code you posted tells me you are directly requesting a PHP file containing that code without properly initializing the WP environment. While that can be made to work, it is an inadvisable practice. WP dependencies are a tangled web. It’s best to either invoke the entire thing or manage without any WP resources. There are limited ways to properly handle requests for custom PHP files. You can make a custom page template or invoke your code via Ajax. Another option that might work for you is to channel requests through /wp-admin/admin-post.php. It’s similar to Ajax, but no JavaScript is required.

    Thread Starter renizmy

    (@renizmy)

    I understand that many wordpress functions work together.
    My objective is to create a member space in my site.
    I was thinking of building the pages using my plugin.
    With a custom page template , I should use something like shortcodes to run my plugin , Am I right ?
    Should I use filters and actions to use the functions “indirectly”?

    Thank you for your answer.

    Moderator James Huff

    (@macmanx)

    Any particular reason you don’t want to use an established plugin for that, like https://buddypress.org/ or https://wordpress.org/plugins/ultimate-member/ ?

    Thread Starter renizmy

    (@renizmy)

    I would like to be able to display different custom account pages depending on the user’s rank. I already tried wp-members, members and buddy but I can’t do it with those plugins.

    Thank you for your answer

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

The topic ‘Class “NOOP_translation’ not found in[…]’ is closed to new replies.