• Resolved ishikoro

    (@ishikoro)


    I’m using a plugin called WordPress Popular Posts.

    The problem is that the Thumbnail images are not changed after I change the thumbnails of posts.

    So that I tried to empty image cache in the setting page, but it tells me ‘You don’t have enough permission to do this’.

    I changed the permission of wordpress-popular-posts file and other all files of this plugin. However, nothing changes and it still tells me that I don’t have enough permission.

    Does anybody know the solution about this problem?

    Thank you for your help.

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Hector Cabrera

    (@hcabrera)

    Hi @ishikoro,

    You’re seeing this message because your WordPress user account doesn’t have the required administrative privileges. WPP allows this action only to users with manage_options permission (see Roles and Capabilities for more details).

    Actually, you shouldn’t be able to access WPP’s admin page if you don’t have this permission. Are you running a modified version of WPP?

    Thread Starter ishikoro

    (@ishikoro)

    Hi @hcabrera

    Thank you for your reply.
    My role is ‘Administrator’, so I guess I have enough permission.

    I’m running a newest version of WPP.(ver. 4.0.13)
    Is there anything else that I could check?

    Thank you for your support.

    Plugin Author Hector Cabrera

    (@hcabrera)

    That’s odd, @ishikoro. I also have an admin account and I don’t have this issue. Actually, you’re the very first person ever to report problems with this.

    Try disabling all of your plugins -except for WPP- and try again. If it works, then one of your plugins is causing the problem. Enabling them one at a time will help you figure out which one.

    If WPP still denies the action, try switching to another theme for a moment and try again.

    Let me know how it goes, ok?

    Thread Starter ishikoro

    (@ishikoro)

    Hi @hcabrera

    Thank you for your reply.
    I disabled all the plugins except WPP and tried to empty image cache again.
    It didn’t work.

    I changed a theme and tried it again, but it didn’t work neither.

    For this problem, I directly went to server and deleted the image which I want to change, then the image was updated.
    For now, I can use that solution.

    Thank you.

    Plugin Author Hector Cabrera

    (@hcabrera)

    Thanks for reporting back.

    I just tested the feature on my site and couldn’t reproduce the issue. Whenever you have the chance, please:

    1. Go to Settings > WordPress Popular Posts and append &tab=debug to the URL in the address bar of your browser.
    2. Share here the info displayed in your Debug screen.
    Thread Starter ishikoro

    (@ishikoro)

    Thank you for your reply.
    This is Debug scree.

    PHP version: 7.1.5

    PHP extensions: Core, date, libxml, openssl, pcre, sqlite3, zlib, bcmath, bz2, calendar, ctype, curl, dom, hash, fileinfo, filter, ftp, gd, gettext, SPL, iconv, session, intl, json, mbstring, mcrypt, standard, mysqlnd, mysqli, PDO, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, Reflection, imap, SimpleXML, soap, sockets, exif, tidy, tokenizer, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, cgi-fcgi, imagick, OAuth, Zend OPcache

    Database version: 5.6.23-log

    InnoDB availability: DEFAULT

    WordPress version: 4.9.4

    Multisite: No

    Active plugins: AddQuicktag 2.5.2, AddToAny Share Buttons 1.7.25, All In One SEO Pack 2.4.5.1, All in One SEO Pack & qTranslate-X 1.0, Breadcrumb NavXT 6.0.4, Contact Form 7 5.0, qTranslate-X 3.4.6.8, Table of Contents Plus 1601, TinyMCE Advanced 4.6.7, WordPress Popular Posts 4.0.13, Yet Another Related Posts Plugin 4.4

    Theme: Original () by

    Thanks you.

    Plugin Author Hector Cabrera

    (@hcabrera)

    Thanks, @ishikoro.

    I didn’t find anything unusual in your setup that might explain what’s going on. I’ll have another look at the code and get back to you as soon as possible.

    Thread Starter ishikoro

    (@ishikoro)

    Thank you.
    I’m looking forward to it.

    Plugin Author Hector Cabrera

    (@hcabrera)

    Hey @ishikoro,

    I’m looking at the part of the code that handles the deletion of thumbnails and I need your help.

    As you can see, the plugin checks if the user can manage_options (which by default is a permission only administrators have, as you already know) and also checks if a valid security token is present. Since you mentioned that you have admin privileges, the only other way the plugin will reject to perform the action is if the security token isn’t valid.

    So, please:

    1. In your wp-config.php file, set WP_DEBUG to true.
    2. Add the following two constants right after it:
      define( 'WP_DEBUG_LOG', true );
      define( 'WP_DEBUG_DISPLAY', false );

    Next:

    1. Go to Plugins > Editor and select WordPress Popular Posts from the dropdown at the right to edit it.
    2. Open admin/class-wordpress-popular-posts-admin.php.
    3. Find the block of code I mentioned earlier, and right before it add this code:
      error_log( "current_user_can( 'manage_options' ) = " . current_user_can( 'manage_options' ) );
      error_log( "( $token === $key ) = " . ( $token === $key ) );
    4. Click on Update File to save changes.
    5. Go to Settings > WordPress Popular Posts and try to empty the thumbnails cache again.

    If everything went OK, you should have a debug.log file inside your wp-content folder with some texts in it. Please share it so I can have a look at the output (and make sure to remove any sensitive information from the log, such as absolute paths to your files).

    Thread Starter ishikoro

    (@ishikoro)

    Hi

    Thank you for reply.

    Before answering to your reply, I wanna tell you a new solution to empty image cash I found today.

    If I try to empty image cash from Google Chrome, it tells me I don’t have enough permission. However, I do it from Safari, I can do it.

    Do you think of anything that might have caused it?

    Thank you.

    Plugin Author Hector Cabrera

    (@hcabrera)

    No idea, to be honest. I use Google Chrome all the time and for me it works normally.

    Open Google Chrome’s console (cmd+shift+J, if I’m not mistaken) and try deleting the images again. If you spot any errors in the console, please take a screenshot and share it here so I can have a look @ishikoro.

    • This reply was modified 6 years, 8 months ago by Hector Cabrera. Reason: Fixed typo
    Plugin Author Hector Cabrera

    (@hcabrera)

    Marking as resolved due to inactivity.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘I can not empty image cache. (WordPress Popular Posts)’ is closed to new replies.