[wp-trac] [WordPress Trac] #37943: Invalid link to the "Run importer" action while installing importer plugin from a multisite sub-site
WordPress Trac
noreply at wordpress.org
Mon Sep 5 12:47:42 UTC 2016
#37943: Invalid link to the "Run importer" action while installing importer plugin
from a multisite sub-site
-------------------------------------+-------------------------------------
Reporter: joelcj91 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.7
Component: Import | Version: 4.6
Severity: normal | Resolution:
Keywords: has-screenshots needs- | Focuses: javascript,
patch | administration, multisite
-------------------------------------+-------------------------------------
Comment (by joelcj91):
Ok. I shall create another patch like you suggested.
Replying to [comment:4 swissspidy]:
> On Multisite, new plugins can only be installed via `wp-admin/network
/plugin-install.php`, not `wp-admin/plugin-install.php`. That's why
`wp_ajax_install_plugin()` uses `network_admin_url()`. Importers are
installed on `wp-admin/import.php` though, so that assumption breaks.
>
> Replacing the URL in the JavaScript is not a good idea as it only treats
the symptom, not the cause.
>
> We could solve this by passing `pagenow` in the Ajax request and change
the URL depending on that, like we already do with
`wp_ajax_search_install_plugins()`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37943#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list