projectnami icon indicating copy to clipboard operation
projectnami copied to clipboard

Unable to activate plugins - link has expired

Open benoithamet opened this issue 6 years ago • 14 comments

Hi there

no sure if this is new or was there for sometime but I have installed a new plugin on a Nami WordPress site, which already had various plugins installed, activated and updated over the time, and it always failed with the error "link has expired please try again" off course googling is not helpful

PS tried also on a different instance, hosted on a different server and same error thanks

benoithamet avatar Mar 17 '19 06:03 benoithamet

Anything in your php_errors.log which might point to something more specific?

patrickebates avatar Mar 17 '19 13:03 patrickebates

Based on the error you are seeing, I believe this to be a NONCE issue but without some error logs or other data we have no way to track it down. I have yet to see this behavior on any of the numerous sites I'm involved with.

patrickebates avatar Mar 17 '19 14:03 patrickebates

thanks Patrick Unfortunately I have nothing related to the plugin activation (or deactivation as this also occurs when trying to deactivate) the php_error log

benoithamet avatar Mar 17 '19 22:03 benoithamet

Hey... I had that problem this morning, it appears that the upload limit was exceeded. I placed a .user.ini file in the root folder of the site. The contents are as follows:

upload_max_filesize = 64M post_max_size = 64M max_execution_time = 300

The file is at: https://raw.githubusercontent.com/PHuhn/ProjectNami-Windows-Install-Utils/master/.user.ini Good luck, hope it works. Phil

PHuhn avatar Mar 22 '19 17:03 PHuhn

Thanks Phuhn Unfortunately this did not change anything; still having the 'link has expired' error

benoithamet avatar Mar 25 '19 00:03 benoithamet

The problem I was having, I could not upload a large theme I was testing. I googled the error message and found the solution that worked for me, but I had to translate it Project Nami and IIS. The limit is displayed below an attempt to upload media. I also tried a web.config solution, but that did not pan out. Phil

PHuhn avatar Mar 26 '19 13:03 PHuhn

I know but never had any issue with file upload This only applies to activating/deactivating plugins - or at least so far as I'm not testing everything When I searched before opening this one, all i found was related to the file size upload limit but this definitively not applies here

benoithamet avatar Mar 27 '19 05:03 benoithamet

Hi there well I think I found something and this seems confirming this has something to do with the "activate" link shown below the plugin If I check the box on the left side and then use the bulk drop down menu and select Activate, the plugin is activated successfully with no "the link has expired" error

benoithamet avatar Mar 28 '19 05:03 benoithamet

Yes, that's why I mentioned it was related to a nonce issue. You should be able to see a nonce parameter in the URL of those links.

patrickebates avatar Mar 28 '19 14:03 patrickebates

well and how do we get ride of this error then?

benoithamet avatar Mar 28 '19 21:03 benoithamet

Can you please post the URL?

PHuhn avatar Mar 29 '19 12:03 PHuhn

not specific to one plugin; but here is 2 for activation and deactivation /wp-admin/plugins.php?action=activate&plugin=amp%2Famp.php&plugin_status=all&paged=1&s&_wpnonce=f4e2da04de /wp-admin/plugins.php?action=deactivate&plugin=image-watermark%2Fimage-watermark.php&plugin_status=all&paged=1&s&_wpnonce=4cdf66825e

benoithamet avatar Mar 29 '19 23:03 benoithamet

It almost has to be a failure to write the nonce into the DB, or that something is wrong when comparing the nonce when resubmitted. I have no idea why either would occur, and therefore no advice to offer.

Nothing in the PHP error log? Anything off about the time and/or time zone on the server?

patrickebates avatar Mar 30 '19 00:03 patrickebates

nope no error what so ever logged anywhere and no time or timezone issue on the server - tested on 2 different Nami WP instances running on 2 different Win 2019 servers

benoithamet avatar Mar 30 '19 20:03 benoithamet