ryancramerdesign / ProcessWireUpgrade

Upgrade ProcessWire core to latest master or dev version automatically in the admin.
16 stars 6 forks source link

Not all site modules listed #2

Closed adrianbj closed 9 years ago

adrianbj commented 10 years ago

I think I mentioned this somewhere in the forum, but the list of modules shown under Setup > Upgrades is nowhere near complete. If you don't see that at your end, let me know and I'll see what I can do to figure out if there is something common in the ones that aren't listed.

I did notice recently that $moduleInfo['core'] doesn't seem to work consistently, although I am not sure you are using this to determine core/site modules in this module anyway.

tobaco commented 9 years ago

I'm also not seeing all the modules and in one install I'm even missing the PW core (stable/dev).

mbrett5062 commented 9 years ago

Also only showing dev core and stable core plus 10 modules.

adrianbj commented 9 years ago

Thanks guys for bumping this :)

mbrett5062 commented 9 years ago

Not sure if this will help in fixing this issue, which is still present. Here is the text of the JSON response from modules.processwire.com that I received whilst debugging this in PHP Storm.

{"status":"success","selector":"parent=\/modules\/, limit=10, sort=title, class_name=BatchChildEditor|BodyClass|FieldtypeCroppableImage|InputfieldCroppableImage|ProcessCroppableImage|FieldtypeConcat|FieldtypeDimension|InputfieldDimension|FieldtypeFontIconPicker|InputfieldFontIconPicker|MarkupFontIconPicker|FieldtypeMultiplier|InputfieldMultiplier|FieldtypePagesSelectorQuery|FieldtypePhone|InputfieldPhone|FieldtypeRangeSlider|InputfieldRangeSlider|FieldtypeSelect|FieldtypeTable|InputfieldTable|FieldtypeTextareas|InputfieldTextareas|FieldtypeTextUnique|FormBuilder|InputfieldFormBuilderFile|ProcessFormBuilder|FormSaveReminder|ImageExtra|JqueryDataTables|MaintenanceMode|ManageFiles|MarkupSEO|MarkupSimpleNavigation|MarkupSitemapXML|ModulesManager|ModulesManagerNotification|PageCleanEmptyDirs|PageListShowPageId|PageRenameOptions|Abbreviate|ProcessAbbreviate|FieldtypeAdminCustomPagesSelect|ProcessBatcher|ProcessDatabaseBackups|ProcessDataTable|DiagnoseDatabase|DiagnoseFiles|DiagnoseImagehandling|DiagnoseModules|DiagnosePhp|DiagnoseWebserver|ProcessDiagnostics|ProcessExportProfile|ProcessPageDelete|ProcessPageFieldSelectCreator|ProcessPageHidden|ProcessPageListerPro|ProcessPagePublish|ProcessSelectorTest|ProcessWireConfig|ProcessWireUpgrade|ProcessWireUpgradeCheck|SetPublishDate|TextformatterAutoLinks|TextformatterAutoP|TextformatterSrcset|TextformatterVideoEmbed","sort":"title","of":0,"debug":0,"start":0,"end":9,"limit":10,"total":37,"pageNum":1,"pageTotal":4,"next_pagination_url":"http:\/\/modules.processwire.com\/export-json\/page2","prev_pagination_url":"","items":[{"class_name":"ProcessAbbreviate","module_version":"0.3.2","version":32,"requires_versions":{"Abbreviate":[">=",0]}},{"class_name":"BatchChildEditor","module_version":"0.3.5","version":35,"requires_versions":[]},{"class_name":"ProcessBatcher","module_version":"1.0.4","version":104,"requires_versions":[]},{"class_name":"BodyClass","module_version":"1.0.0","version":100,"requires_versions":[]},{"class_name":"PageCleanEmptyDirs","module_version":"0.0.3","version":3,"requires_versions":[]},{"class_name":"FieldtypeConcat","module_version":"1.0.5","version":105,"requires_versions":[]},{"class_name":"FieldtypePagesSelectorQuery","module_version":"1.0.1","version":101,"requires_versions":[]},{"class_name":"ProcessDatabaseBackups","module_version":"0.0.3","version":3,"requires_versions":{"ProcessWire":[">=","2.4.15"]}},{"class_name":"FieldtypeDimension","module_version":"1.0.3","version":103,"requires_versions":[]},{"class_name":"FieldtypeSelect","module_version":"1.2.0","version":120,"requires_versions":[]}]}

As you can see at the beginning of each section, a limit of "10" is being set on the return.

I am not sure if this is coming from the local side or from the server side, but maybe Ryan will know.

adrianbj commented 9 years ago

Nice sleuthing on catching the limit - that certainly seems like it is the issue to me!

mbrett5062 commented 9 years ago

Yes it is. I have just tested modifying the module as follows.

The file to edit is "ProcessWireUpgradeCheck.module"

Lines 177-180 change to the following:

' $url = $this->config->moduleServiceURL . "?apikey=" . $this->config->moduleServiceKey . "&limit=100" . "&field=module_version,version,requires_versions" . "&class_name=";'

This will now return at least 100 modules. If you have more then that it is still an issue.

What really needs to be fixed, is that the output of the Jquery data table needs to pickup the pagination. A page url is sent in the response. Not sure how this should be done in code. I will have to leave that to Ryan. Incidently if you are interested, then you can visit this page to read about the format of the URL sent to request the data.

JSON Export web service

adrianbj commented 9 years ago

Thanks Ryan,

Great to have this fixed!