Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.0] Error in legacy plugins when method contains $event argument #30575

Merged
merged 5 commits into from
Sep 29, 2020
Merged

[4.0] Error in legacy plugins when method contains $event argument #30575

merged 5 commits into from
Sep 29, 2020

Conversation

SharkyKZ
Copy link
Contributor

@SharkyKZ SharkyKZ commented Sep 5, 2020

Summary of Changes

Fixes legacy plugins being registered as modern plugins when method takes $event argument.

Testing Instructions

install and enable this plugin: plg_system_dummy.zip.

Actual result BEFORE applying this Pull Request

Argument 1 passed to PlgSystemDummy::onDummyTest() must be of the type string, object given

Expected result AFTER applying this Pull Request

No errors.

Documentation Changes Required

No.

@ChristineWk
Copy link

@SharkyKZ

Installed dummy plugin. Joomla 4.0.0-beta4
Before Patch:
0 Argument 1 passed to PlgSystemDummy::onDummyTest() must be of the type string, object given, called in /......./libraries/vendor/joomla/event/src/Dispatcher.php on line 495

Couldn't return to Dashboard & now site is broken.
Will install tomorrow a new fully nightly (4.0.0-beta5)


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30575.

@SharkyKZ
Copy link
Contributor Author

That's expected behavior before patch.

@ChristineWk
Copy link

I have tested this item ✅ successfully on 7e7b73c


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30575.

@ChristineWk
Copy link

ChristineWk commented Sep 17, 2020

That's expected behavior before patch.

Of course, the message before patch was expected, but not, that my site becomes complety broken.

What I did:
At first I deleted the dummy plugin via phpMyAdmin successfully & backend was available again.
The possibility for an update tor 4.0.0-beta5 was shown > but unsuccessful, because got: AJAX Loading error ...
(Correct server nightly xml)

Therefore I deleted space/database and installed fully nightly 4.0.0-beta5 plus Patchtester etc.
Then activated this Patch (did not check now message before Patch :-)
Installed your Dummy plugin and Result: No failure/message.

@ChristineWk
Copy link

Hmmm: After successful Patch (see above) I reverted it and got the failure again. Backend broken now.
Will try to delete dummy Plugin via phpMyAdmin again.

For other testers: Please before reverting Patch: de-active Plugin ....


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30575.

@SharkyKZ
Copy link
Contributor Author

I hope you're not testing on live site 😅

@ChristineWk
Copy link

I hope you're not testing on live site 😅

It's a live site (space), but for testing purposes only of course :-)
Will never forget your plugin -hv deleted it now :-)

@jwaisner
Copy link
Member

I have tested this item ✅ successfully on 7e7b73c


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30575.

@jwaisner
Copy link
Member

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30575.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Sep 22, 2020
@laoneo
Copy link
Member

laoneo commented Sep 29, 2020

Conflicts here...

@SharkyKZ
Copy link
Contributor Author

Conflicts fixed.

@SharkyKZ
Copy link
Contributor Author

Last commit changes condition order for optimization. No change in functionality.

@zero-24 zero-24 added this to the Joomla 4.0 milestone Sep 29, 2020
@laoneo laoneo merged commit d338d57 into joomla:4.0-dev Sep 29, 2020
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Sep 29, 2020
@laoneo
Copy link
Member

laoneo commented Sep 29, 2020

Thanks!

@SharkyKZ SharkyKZ deleted the j4/bug/plugin-event branch September 29, 2020 11:45
dgrammatiko added a commit to dgrammatiko/joomla-cms that referenced this pull request Sep 29, 2020
…ger_events_consistency

* '4.0-dev' of github.com:joomla/joomla-cms: (84 commits)
  [4.0] Error in legacy plugins when method contains $event argument (joomla#30575)
  [4.0] Cassiopea table css (joomla#30740)
  [4.0] Blog view links (joomla#30788)
  Change grid minmax definition for newsflash module (joomla#30781)
  [4.0] Pluginless lazyloading for the core (joomla#30748)
  Update package-lock.json (joomla#30713)
  [4.0] mod_article_news readmore (joomla#30780)
  Improve code, remove separator (joomla#30785)
  [4.0] Template layout select (joomla#30772)
  [4.0][CLI] com_finder use console command (joomla#30768)
  [4.0] Modifying com_actionlogs string (joomla#30758)
  [4.0] Fancy selectbox fix (joomla#30739)
  [4.0] Add missing Table Caption (joomla#30763)
  [4.0] Wrap all buttons in btn-group to improve styling (joomla#30761)
  [4.0] Cassiopeia missing string (joomla#30765)
  Improve batch text (joomla#28447)
  Fix icons not displaying (joomla#30749)
  Remove the chrome "cardGrey". The same effect can be achieved by using the module class "card-grey" with the "card" chrome (joomla#30734)
  Remove obsolete html code (joomla#30737)
  [4.0] Check out improvements related to nullable columns (joomla#30747)
  ...

� Conflicts:
�	administrator/components/com_media/resources/scripts/app/Api.js
�	administrator/components/com_media/resources/scripts/components/toolbar/toolbar.vue
�	package-lock.json
sakiss pushed a commit to sakiss/joomla-cms that referenced this pull request Oct 16, 2020
…oomla#30575)

* Error in legacy plugins when method contains $event argument

* Unnecessary parentheses

* Correct comment

* Optimize
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants