[wp-trac] [WordPress Trac] #41151: Fatal error on Plugin Activation if it bundled in theme
WordPress Trac
noreply at wordpress.org
Sun Jun 25 09:14:21 UTC 2017
#41151: Fatal error on Plugin Activation if it bundled in theme
------------------------------------------------+--------------------------
Reporter: rinkuyadav999 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting
Component: Plugins | Review
Severity: normal | Version: trunk
Keywords: has-screenshots dev-feedback close | Resolution:
| Focuses:
| administration
------------------------------------------------+--------------------------
Changes (by swissspidy):
* keywords: has-screenshots dev-feedback => has-screenshots dev-feedback
close
Comment:
Here's a recent explanation of why you shouldn't bundle plugins in themes:
https://wordpress.stackexchange.com/questions/269547/what-would-happen-if-
the-admin-installs-a-plugin-when-the-plugin-is-included-in?atw=1
> It is properly modified and bundled in theme. This should not display
Fatal Error on Activation because already declare function is inside
condition.
Well, there's a condition in the bundled plugin inside your theme but not
in the original plugin. Looking at the error message, the theme code is
loaded first, which basically makes the condition pointless.
As WordPress currently has no dependency management, it's the developer's
job to check for this kind of conflicts.
----
Related: #12839, #22316.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41151#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list