• Resolved happy1wp

    (@happy1wp)


    First off — thanks so much for crafting such a wonderful plugin!

    For v1.3.8 of the plugin we discovered a slight bug in that an admin user is unable to update the slug value of a slider. In the browser’s web console this error was occurring: Failed to load resource: the server responded with a status of 401 (Unauthorized) on the POST to /wp-admin/admin-ajax.php after making a change under Depicter->Options->General->”Slider Slug”.

    On line 113 of depicter/app/routes/ajax.php for the current v1.3.8 plugin if this line is modified from
    ->middleware('csrf-api:depicter-dashboard' )
    to
    ->middleware('csrf-api:depicter-editor|depicter-dashboard' )

    then an admin user is able to successfully modify the ‘slug’ of a slider under Depicter->Options->General->”Slider Slug”. The above code was taken from the successfully working code to rename a slider from line 45 depicter/app/routes/ajax.php as shown with context below:

    // Renames a document
    Depicter::route()->methods(['POST'])
    	->where( 'ajax', 'depicter/document/name/change', true, true )
    	->middleware('csrf-api:depicter-editor|depicter-dashboard' )
    	->middleware('userCan:edit_depicter' )
    	->handle( 'DashboardAjaxController@changeName' );

    I hope the above is intelligible and proves useful. Thanks again for sharing such a great plugin with the wordpress community!

    • This topic was modified 2 years ago by happy1wp.

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter happy1wp

    (@happy1wp)

    I noticed the latest version of Depicter has been released at v1.5.0. I updated to v1.5.0 and I still can’t modify the ‘slug’ of a slider — it fails and shows a popup that says: “Your sessions has been expired. please reload the page and try once again”

    The above is the same behavior I experienced in v1.3.8, but I worried my initial report was too convoluted as it dove into a fix before clearly describing the issue. Thanks!

    Plugin Author averta

    (@averta)

    @happy1wp ,
    Sorry we were busy on Depicter Pro, right now I talked to our Dev team about this and I would like to say you are right and we will be fixing this in next update

    Thanks for reporting this to us

    Thread Starter happy1wp

    (@happy1wp)

    @averta,

    Thanks so much for your response. Congratulations on the Depicter Pro release btw. I’ll watch for the fix to appear, but wanted to thank you for the help! Cheers!

    Plugin Author averta

    (@averta)

    @happy1wp
    You are welcome and thank you for letting us know about the issue.
    I will reply to you here when we fix this too.

    Regards

    Plugin Author averta

    (@averta)

    @happy1wp ,
    We are going to release an update for this in the next few hours, please try this and let us know.

    Thread Starter happy1wp

    (@happy1wp)

    @averta,
    I just tested the latest release and am able to confirm the latest release fixes this issue. Excellent news! Thanks!

    • This reply was modified 1 year, 11 months ago by happy1wp.
    Plugin Author averta

    (@averta)

    @happy1wp
    I am happy to hear that, you may also support us by giving Depicter a 5* review if you think we deserve that.

    Regards

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘changing slider ‘slug’ fails (401 unauthorized) on POST to wp-ajax.php’ is closed to new replies.