WordPress.org

Forums

Advanced Access Manager
[resolved] "TypeError: textarea is null" when changing the "current role/user" (14 posts)

  1. eqhes
    Member
    Posted 2 years ago #

    Hi,

    I'm using WordPress Multisite 3.5.1 and the latest version of your plugin (1.7.2) on one of the sites.

    Right after the plugin was installed I was able to add new roles and use the "change" option to edit their capabilities. Suddenly -I don't know after what action- I started to not be able to use the "change" option neither for the "current role" nor the "current user". When trying to do this I get this error in the error console:

    Error: TypeError: textarea is null
    Archivo de origen: http://{my website url}/wp-content/plugins/advanced-access-manager/view/js/codemirror/codemirror.js?ver=3.5.1
    Línea: 1888

    Can you give me some advice on this, please?

    Thank you in advance.

    http://wordpress.org/extend/plugins/advanced-access-manager/

  2. codee47
    Member
    Posted 2 years ago #

    I have experienced the same problem. Have you found any solution to it?

    Thanks

  3. WP AAM
    Member
    Plugin Author

    Posted 2 years ago #

    Hi guys,
    There must be some conflict between CodeMirror and some other javascript files in your installation.
    If there is any possibility to deactivate all you plugins one-by-one and find out which plugin causes this?

    Appreciate your feedback.
    Vasyl

  4. MarianoFerro
    Member
    Posted 2 years ago #

    deactivate all plugins and no found :(

  5. estepix
    Member
    Posted 2 years ago #

    Hi I'm having the same problem in multiple sites, plugin version is 1.7.2 and 1.7.3, it would be great if you could look further into this problem.

    If you need a hand testing/debugging please let me know.

    Uncaught TypeError: Cannot read property 'value' of null
    CodeMirror.fromTextAreacodemirror.js:1890
    aamObject.initConfigPressTabadmin-options.js:653
    aamObject.initMainMetaboxadmin-options.js:1116
    (anonymous function)admin-options.js:747
    v.Callbacks.lload-scripts.php:2
    v.Callbacks.c.fireWithload-scripts.php:2
    Tload-scripts.php:2
    v.support.ajax.v.ajaxTransport.send.r
  6. GuTheR
    Member
    Posted 2 years ago #

    No arquivo mvb_wp_access.php substitua a função render_optionlist()

    public function render_optionlist() {
      $role = mvb_Model_Helper::getParam('role', 'POST');
      $user = mvb_Model_Helper::getParam('user', 'POST');
      $m = new mvb_Model_ManagerAjax($this, $role, $user);
      $return = $m->manage_ajax('option_list');
      foreach($return as $a => $b)
        $return[$a] = utf8_encode($b);
      die(json_encode($return));
    }
  7. estepix
    Member
    Posted 1 year ago #

    Hi @GuTheR,

    I'm trying your fix and it's working great, so it was an encoding problem after all!

    If any of you does not understand Portuguese, GuTheR is suggesting to replace function render_optionslist in file mvb_wp_access.php with the the function he wrote.

    Many thanks GuTheR!!!

    By the way, I think this problem starts happening only after going to Tab Metaboxes & Widgets and clicking on Generate List. After that, the blank page of death started to show up!!!

  8. estepix
    Member
    Posted 1 year ago #

    Hi Vasil,

    This error is still happening on v1.7.5 it would be great if you could review and eventually apply GuTheR's change to the code. At the moment I have a git patch and have to apply it to the plugin every time there is an update.

    Thanks in advance

  9. WP AAM
    Member
    Plugin Author

    Posted 1 year ago #

    Hi guys,
    Sorry for delays. I did not treat AAM seriously until couple people convinced me to dedicate some time on it.
    So I'm back.
    The fix will be included in release 1.8 which might come out in couple days.

    Thanks for your feedback.
    Vasyl

  10. estepix
    Member
    Posted 1 year ago #

    Great news! Thanks Vasyl, I am eager to lay hands on that update!

  11. WP AAM
    Member
    Plugin Author

    Posted 1 year ago #

    Hi guys,
    Follow me on twitter to know the latest news.

  12. estepix
    Member
    Posted 1 year ago #

    Hi Vasyl,

    I'm having the same problem (blank page on changing Current role / user) using version 1.8.5 and WP 3.7.

    I tried the fix advised here with no luck:
    http://wordpress.org/support/topic/weird-characters-after-role-or-user-change?replies=1

    Again, changing the render_optionlist() function to what GuTher suggested above gets everything working again.

  13. WP AAM
    Member
    Plugin Author

    Posted 1 year ago #

    Hi estepix,
    My bad. Please check the topic http://wordpress.org/support/topic/weird-characters-after-role-or-user-change?replies=1 again.
    I made a mistake in ConfigPress.

    Regards,
    Vasyl

  14. estepix
    Member
    Posted 1 year ago #

    Great! I just tried it and it's working fine.

    Thanks a million for this fix!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Advanced Access Manager
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic