• Resolved Hyrules

    (@hyrules)


    Hi Bhaldie,

    I’m currently using the latest version of Memphis Docs and I have setup my things so that only a specific role are allowed to upload files but for some reason the pages does not seem to load properly. This happens if I Upload or update a document. Here is the error :

    Uncaught SyntaxError: Unexpected token Y in JSON at position 0
    at JSON.parse (<anonymous>)
    at Object.success (memphis-documents.min.js?ver=4.8.2:1)
    at i (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,farbtastic&ver=4.8.2:2)
    at Object.fireWith [as resolveWith] (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,farbtastic&ver=4.8.2:2)
    at y (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,farbtastic&ver=4.8.2:4)
    at XMLHttpRequest.c (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,farbtastic&ver=4.8.2:4)
    (anonymous) @ memphis-documents.min.js?ver=4.8.2:1
    i @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,farbtastic&ver=4.8.2:2
    fireWith @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,farbtastic&ver=4.8.2:2
    y @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,farbtastic&ver=4.8.2:4
    c @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,farbtastic&ver=4.8.2:4
    XMLHttpRequest.send (async)
    (anonymous) @ VM187:1
    send @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,farbtastic&ver=4.8.2:4
    ajax @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,farbtastic&ver=4.8.2:4
    n.(anonymous function) @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,farbtastic&ver=4.8.2:4
    (anonymous) @ memphis-documents.min.js?ver=4.8.2:1
    dispatch @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,farbtastic&ver=4.8.2:3
    r.handle @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,farbtastic&ver=4.8.2:3

    Thanks.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author bhaldie

    (@bhaldie)

    try going to mdocs dashboard Options > Settings > Disable Thrid Party Includes > and check jQuery

    Thread Starter Hyrules

    (@hyrules)

    No joy. Still the same error.

    Plugin Author bhaldie

    (@bhaldie)

    when u revert back to a pervious version is the error still there?

    Thread Starter Hyrules

    (@hyrules)

    the issue does not seem to happen in 3.7.1

    Thread Starter Hyrules

    (@hyrules)

    although I have the “mdocs_display_description” function does not exist and “mdocs_display_real_author” function does not exist now but it’s better than not being able to upload at the moment. thanks.

    Plugin Author bhaldie

    (@bhaldie)

    you can disable those functions from mdocs settings. I will have a look at version 3.7.2 and see what changes have been made to cause this error.

    Plugin Author bhaldie

    (@bhaldie)

    one thing you could also try is to disable all other plugins and see if the error still remains.

    Thread Starter Hyrules

    (@hyrules)

    I have disabled all the plugins on my end except Memphis Doc and the issue is still happening on version 3.7.2.

    Thread Starter Hyrules

    (@hyrules)

    Side note this does not seem to happen with the administrator account.

    Plugin Author bhaldie

    (@bhaldie)

    Okay I have found the issue…. if you open the mdocs-localization.php file and goto lines 90 and 94:

    Line 90:

    
    if(current_user_can('manage_options')) mdocs_add_update_ajax('Add Document');
    

    Line 94:

    
    if(current_user_can('manage_options')) mdocs_add_update_ajax('Update Document');
    

    and change it to:
    Line 90:

    
    if(current_user_can('mdocs-dashboard')) mdocs_add_update_ajax('Add Document');
    

    Line 94:

    
    if(current_user_can('mdocs-dashboard')) mdocs_add_update_ajax('Update Document');
    
    • This reply was modified 7 years, 1 month ago by bhaldie.
    Thread Starter Hyrules

    (@hyrules)

    That does seem to fix it thanks alot !

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Users cannot upload or update anymore’ is closed to new replies.