Title: Error message in console
Last modified: January 14, 2024

---

# Error message in console

 *  Resolved [rosbiffer](https://wordpress.org/support/users/rosbiffer/)
 * (@rosbiffer)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/error-message-in-console-2/)
 * I am getting an error message in my console on the above site of this:
 *     ```wp-block-code
       <script type="text/javascript" id="wp-data-js-after"> /* <![CDATA[ */
       ( function() {
        var userId = 2;
        var storageKey = "WP_DATA_USER_" + userId;
        wp.data
        .use( wp.data.plugins.persistence, { storageKey: storageKey } );
       } )();
       ```
   
 * The error is in the .use line (presumably it should be .user?). It disappears
   when I disable ProfileGrid. Is it coming from your plugin?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ferror-message-in-console-2%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [ProfileGrid Support](https://wordpress.org/support/users/profilegrid0/)
 * (@profilegrid0)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/error-message-in-console-2/#post-17343877)
 * Hello @rosbiffer,
 * We checked and the error is is not related with our plugin. The code you’ve provided
   seems to be JavaScript code related to WordPress and the use of the `wp.data`
   object. The error you’re encountering might be related to various issues, and
   it’s hard to pinpoint the exact problem without more context or the specific 
   error message.
 *  [racccio](https://wordpress.org/support/users/racccio/)
 * (@racccio)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/error-message-in-console-2/#post-17377920)
 * Hello, I’m getting the same error. It disappears when I disable woocommerce. 
   In my case, users without account cannot place orders anymore. It seams that 
   wp.data.use has been used to store some user data but it fails for guests. Could
   you help me?
 *  [wm408](https://wordpress.org/support/users/wm408/)
 * (@wm408)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/error-message-in-console-2/#post-17416626)
 * Hi,
 * I was looking at this at the browser console and when I change the JSON body 
   key from “storageKey” to just “storage”, the function appears to behave correctly.
 *     ```wp-block-code
       <script type="text/javascript" id="wp-data-js-after">
         /* <![CDATA[ */
         (function() {
           var userId = 0;
           var storageKey = "WP_DATA_USER_" + userId;                  
   
       wp. data.use(wp.data.plugins.persistence, {
          storage: storageKey
       });
       }
       )();
       /* ]]> */
       </script>
       ```
   
 * …So I wonder, what is a good way to at least temporarily resolve this issue until
   the plugin issuer fixes it?
 * Side note: this code block above comes from: data.min.js.
 * Thanks.
    -  This reply was modified 2 years, 3 months ago by [wm408](https://wordpress.org/support/users/wm408/).
 *  [wm408](https://wordpress.org/support/users/wm408/)
 * (@wm408)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/error-message-in-console-2/#post-17419137)
 * Follow up,
 * I realize there’s also a storageKey variable, but for whatever reason it is not
   being set. So my earlier comment that storage is the right place to put the data,
   is probably not right. Still not sure why this is happening.

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

The topic ‘Error message in console’ is closed to new replies.

 * ![](https://ps.w.org/profilegrid-user-profiles-groups-and-communities/assets/
   icon.svg?rev=2547387)
 * [ProfileGrid – User Profiles, Groups and Communities](https://wordpress.org/plugins/profilegrid-user-profiles-groups-and-communities/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/profilegrid-user-profiles-groups-and-communities/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/profilegrid-user-profiles-groups-and-communities/)
 * [Active Topics](https://wordpress.org/support/plugin/profilegrid-user-profiles-groups-and-communities/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/profilegrid-user-profiles-groups-and-communities/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/profilegrid-user-profiles-groups-and-communities/reviews/)

## Tags

 * [javascript](https://wordpress.org/support/topic-tag/javascript/)

 * 4 replies
 * 4 participants
 * Last reply from: [wm408](https://wordpress.org/support/users/wm408/)
 * Last activity: [2 years, 3 months ago](https://wordpress.org/support/topic/error-message-in-console-2/#post-17419137)
 * Status: resolved