Skip to content

End of support plugin#40556

Closed
mfleeson wants to merge 40 commits intojoomla:4.4-devfrom
mfleeson:End-of-Support-Plugin
Closed

End of support plugin#40556
mfleeson wants to merge 40 commits intojoomla:4.4-devfrom
mfleeson:End-of-Support-Plugin

Conversation

@mfleeson
Copy link
Copy Markdown
Contributor

@mfleeson mfleeson commented May 7, 2023

Pull Request for Issue # .

Summary of Changes

Rewriting the 3.10 End of Service Notification and placing it into Joomla 4 coding structure and style.
Simplified the language definitions to not be hardcoded for 3 to 4
Currently using const EOS_DATE = '2023-10-25'; in file plugins/quickicon/eos/src/Extension/Eos.php The correct date should be 2025-10-25 but then the notification does not appear.
Dimitris converted the jQuery code into working javascript for closing the notification and also calling the com_ajax so the hide me is stored in the plugin parameters.

Testing Instructions

Build.
Check plg_quickicon_eos is enabled.
View Home Dashboard in the back end.

Actual result BEFORE applying this Pull Request

No notification is displayed

Expected result AFTER applying this Pull Request

A notification is displayed

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • [x ] No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

mfleeson and others added 12 commits May 5, 2023 21:56
An error has occurred.

    0 Class "Joomla\Plugin\Quickicon\Eos\Extension\Eos" not found
Call stack
# 	Function 	Location
1 	() 	JROOT/plugins/quickicon/eos/services/provider.php:36
2 	Joomla\DI\ServiceProviderInterface@anonymous/home/burninglight/public_html/jvp/plugins/quickicon/eos/services/provider.php:22$f41b->{closure}() 	JROOT/libraries/vendor/joomla/di/src/ContainerResource.php:182
3 	Joomla\DI\ContainerResource->getInstance() 	JROOT/libraries/vendor/joomla/di/src/Container.php:96
Adding Namespace to Eos.xml
Fixing issue with Application.
PhpStorm reformat.
Updating the jQuery to close the notification
Debugged the com_ajax code and updated to get the saveParams working.
Not connecting event to button. Needs updating
Removing media folder as Dimitris has moved the Javascript to the build folder.
@joomla-cms-bot joomla-cms-bot added NPM Resource Changed This Pull Request can't be tested by Patchtester PR-4.4-dev labels May 7, 2023
mfleeson added 2 commits May 7, 2023 16:38
@SInCE changed to __DEPLOY_VERSION__
utf changed to UTF
language files moved to administrator/language/en-GB
media and language folders deleted from plugin folder and eos.xml updated to remove folders.
@joomla-cms-bot joomla-cms-bot added the Language Change This is for Translators label May 7, 2023
@mfleeson
Copy link
Copy Markdown
Contributor Author

mfleeson commented May 7, 2023

All requested changes have been made. Thanks.

dgrammatiko and others added 7 commits May 8, 2023 10:11
* Prevent Exception

If $parts is `null` this will throw an exception.

```count(): Argument #1 ($value) must be of type Countable|array, null given```

This can happen if the context is e.g. the default context `text` from the `Joomla\CMS\HTML\Helpers\Content::prepare()` function.

* Update fields.php
…lper

Adding plugin to #__extensions in base and update sql
Adding plugin to ExtensionHelper.php
Updating Eos.php to limit notification to just Notification panel on home
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<authorEmail>admin@joomla.org</authorEmail>
<authorUrl>www.joomla.org</authorUrl>
<version>4.0.0</version>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be <version>3.10.0</version> wich corresponds to the original eos.xml file.
But I doubt. Maybe someone else has advice?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PS. The eos.php file also has references to 3.10.0

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although the base code is from 3.10 the whole codebase was restructured to use 4.x standards so technically this code is at least 4.x based. Some of the functions were left using the 3.10 logic but still were moved to 4.x.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although the base code is from 3.10 the whole codebase was restructured to use 4.x standards so technically this code is at least 4.x based. Some of the functions were left using the 3.10 logic but still were moved to 4.x.

I already understood this, hence my comment.
All the functions (functionality) were left using the 3.10.0, then refer to 3.10.0. As far as I understood.

Ping @laoneo

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code was removed from the 4.0-dev branch once, so the plugin introduced here is something new, even if the code is based on the old one from 3.10-dev. The old one was named "plg_quickicon_eos310" and is uninstalled when updating to J4.x, see https://github.com/joomla/joomla-cms/blob/4.3-dev/administrator/components/com_admin/script.php#L491 . So all code here should get the __DEPLOY_VERSION__ (or 4.4.0 in the XML), there should no "since" tag or so be left from 3.10.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@richard67

Thank you for your clear and complete explanation. I totally agree with it. 👍

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Funny part I had raised suggestions for all of them (ie: #40556 (comment)) but probably a forced pushed reverted all of them

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Funny part I had raised suggestions for all of them (ie: #40556 (comment)) but probably a forced pushed reverted all of them

MEA culpa

namespace Joomla\Plugin\Quickicon\Eos\Extension;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') || die;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Common is: or

Suggested change
\defined('_JEXEC') || die;
\defined('_JEXEC') or die;

@mfleeson mfleeson self-assigned this May 8, 2023
@MacJoom MacJoom self-assigned this May 9, 2023
@mfleeson mfleeson closed this May 9, 2023
@mfleeson mfleeson deleted the End-of-Support-Plugin branch May 9, 2023 16:05
@richard67
Copy link
Copy Markdown
Member

Why closed PR and deleted branch?

@mfleeson
Copy link
Copy Markdown
Contributor Author

mfleeson commented May 9, 2023

I'm sorry I didn't realise it had done that. I thought I was working on my local fork. I was trying to get all of the files back into one place. I didn't delete the branch, just renamed it as I realised it was based on 4.3 and not 4.4. So I created a new fork based on 4.4 and have used a comparison to put all of the code into the new fork. I was going to make sure it adheres to all of these comments and then push that. Git is still very much a black art to me.

@richard67
Copy link
Copy Markdown
Member

Then I think you have to make a new PR with the renamed branch. If you do that, please refer to this PR here in the description of the new PR so people can find previous discussions.

@mfleeson mfleeson restored the End-of-Support-Plugin branch May 9, 2023 16:35
mfleeson added a commit to mfleeson/joomla-cms that referenced this pull request May 9, 2023
Here's the culmination of PR joomla#40556 which I managed to mess up my local installation of which caused the original PR joomla#40556 to be auto closed. Sorry.
@mfleeson
Copy link
Copy Markdown
Contributor Author

mfleeson commented May 9, 2023

The new PR is #40563

@sandewt
Copy link
Copy Markdown
Contributor

sandewt commented May 9, 2023

@MacJoom

Git is still very much a black art to me.

Maybe Github Destop is a good alternative. I read there "Focus on what matters instead of fighting with Git."

I recently started using this program (on Windows) for my own github repositories to gain experience with it. It works quite simple.

@mfleeson
Copy link
Copy Markdown
Contributor Author

mfleeson commented May 9, 2023

I was using github desktop, that's the scary thing but it wasnt updating with other peoples changes so it totally overwrote Dimitri's javascript code. I think I've got it all back in hand now and am going to try and create a new PR for 4.4

The new PR is #40565

@sandewt
Copy link
Copy Markdown
Contributor

sandewt commented May 9, 2023

I was using github desktop, that's the scary thing but it wasnt updating with other peoples changes so it totally overwrote Dimitri's javascript code.

Thanks for the info. Good to know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature Language Change This is for Translators NPM Resource Changed This Pull Request can't be tested by Patchtester

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants