jeremyclark13 / automatic-theme-plugin-update

Self hosted plugin and theme update scripts
http://clark-technet.com/2010/12/wordpress-self-hosted-plugin-update-api
548 stars 147 forks source link

View version x.x details not showing anything #20

Closed zeropointdevelopment closed 11 years ago

zeropointdevelopment commented 11 years ago

My plugin shows the update correctly but when clicking on the view version xx details, the information is not populating that popup box plugin-updater-1

in function check_for_plugin_update the following variables are set at:

$response stdClass Object ( [version] => 1.1 [date] => 2013-02-18 [author] => Lime Canvas [requires] => 3.0 [tested] => 3.5.1 [homepage] => http://www.limecanvas.com/support-and-maintenance/ [downloaded] => 1 [external] => [package] => https://www.limecanvas.com/download.php?key=579a401b73f2d3cf4af28c1b2d29bdd2 [file_name] => lime-canvas-support-plugin-v1.0.zip [sections] => Array ( [description] => Lime Canvas Support Plugin [installation] => Install, active and enter your Customer ID on the settings page. [screen shots] => na [change log] => na [faq] => na [other notes] => na ) [slug] => test-plugin-update [new_version] => 1.1 )

$checked_data stdClass Object ( [last_checked] => 1361188025 [response] => Array ( [test-plugin-update/test-plugin-update.php] => stdClass Object ( [version] => 1.1 [date] => 2013-02-18 [author] => Lime Canvas [requires] => 3.0 [tested] => 3.5.1 [homepage] => http://www.limecanvas.com/support-and-maintenance/ [downloaded] => 1 [external] => [package] => https://www.limecanvas.com/download.php?key=579a401b73f2d3cf4af28c1b2d29bdd2 [file_name] => lime-canvas-support-plugin-v1.0.zip [sections] => Array ( [description] => Lime Canvas Support Plugin [installation] => Install, active and enter your Customer ID on the settings page. [screen shots] => na [change log] => na [faq] => na [other notes] => na ) [slug] => test-plugin-update [new_version] => 1.1 ) ) )

It looks like the correct info is being passed back to the WP updater

Wil.

zeropointdevelopment commented 11 years ago

It actually screws up the View Details.. for all other plugins.

Also - when you add more than one plugin to a site using the updater - only one appears in the Updates tab although the numeric counter on the Updates tab says "2".

mommaroodles commented 11 years ago

I have mine working perfectly for multiple plugins and on a multisite too - you must be doing something wrong

jeremyclark13 commented 11 years ago

If you still have the testing code uncommented at the top of the update code this will happen. Once its commented back out the plugin screens should go back to normal.

--Jeremy Clark Clark Tech Services http://clark-technet.com On Feb 18, 2013 8:26 AM, "Melanie Shepherd" notifications@github.com wrote:

I have mine working perfectly for multiple plugins and on a multisite too

  • you must be doing something wrong

— Reply to this email directly or view it on GitHubhttps://github.com/jeremyclark13/automatic-theme-plugin-update/issues/20#issuecomment-13721744.

zeropointdevelopment commented 11 years ago

Thanks for the replies guys.

I created an empty plugin to test this but I just can't get it to show the info or download the new file.

I did re-comment out that testing code Jeremy but it didn't do anything.

Here's the plugin code: http://pastebin.com/ik2mh64M

and here's the package details: http://pastebin.com/cUBkQWF8

I have the updater under the /api/ root folder of the remote site

Thanks, Wil.

mommaroodles commented 11 years ago

in your packages.php file - i think you should have the following line:

'package' => 'http://www.limecanvas.com/download.php?key=' . md5('lime-canvas-support-plugin-v1.1.zip' . mktime(0,0,0,date("m"),date("d"),date("Y"))),

AS

'package' => 'http://www.limecanvas.com/api/download.php?key=' . md5('lime-canvas-support-plugin-v1.1.zip' . mktime(0,0,0,date("m"),date("d"),date("Y"))),

your download.php and packages.php + the update folder to add the zip files in - or whatever you've called it should be in the api folder.

zeropointdevelopment commented 11 years ago

Thanks @mommaroodles- I'll make that change

turtlepod commented 11 years ago

just try to add underscore in all section id: other notes to other_notes

zeropointdevelopment commented 11 years ago

Found the issue - I was wrongly applying the filter add_filter('plugins_api', array( &$this, 'lcsup_plugin_api_call', 10, 3 ) ); Should have been add_filter('plugins_api', array( &$this, 'lcsup_plugin_api_call'), 10, 3 );

All working now.

Thanks for both of your help.

Awesome code!