GoodNews - status update

A new version of GoodNews 1.6.0-pl is now online and available via MODX extras provider!
The new version is built for MODX 2.3+

[1.6.0-pl] - 2020-05-18

Added

  • Added link_tag_scheme to GoodNewsGetNewsletters Snippet
  • Added help buttons in GoodNews resources (container, mailing)

Changed

  • [#66] Updated controllers to remove deprecated use of modAction
  • Updated installer and package builder to remove deprecated use of modAction
  • Changed GoodNews help URL (new docs site)
  • [#79] Allow password placeholder to be used in GoodNewsSubscription snippet

Removed

  • Removed fileuploadfield.js utility (already included with MODX > 2.3)
  • Removed mgr.css (no longer needed with MODX > 2.3)
  • Removed legacyMode
  • Removed deprecated use of modAction in js files

Fixed

  • Fixed page header in mailing editor
  • Fixed undefined variable notice in cron.php
  • Fixed some old ExtJS legacy code for resource panels (GoodNewsResourceContainer, GoodNewsResourceMailing)
  • [#65] Fixed group names of subscribers groups surrounded by spans
1 Like

I was looking for something that appeared to do exactly what you’ve created. I’ve upgraded my site to MODX 3 and installed the extra via Package Management. Unfortunately it wouldn’t completely install and in the extras panel showed as Not Installed.
Problem was that my resource tree suddenly disappeared.
I removed the extra completely via the Package manager and even purged it but the issue still persists.
If I click on the Extra menu the GoodNews.desc icon comes still and the GoodNews directory is still in the Components directory even though it was supposed to be deleted.
The error I get is:

(ERROR @ /home/cyadmin/public_html/core/components/goodnews/model/goodnews/goodnewsresourcecontainer.class.php : 27) PHP warning: require_once(/home/cyadmin/public_html/core/model/modx/modprocessor.class.php): failed to open stream: No such file or directory

/home/cyadmin/public_html/core/components/goodnews/model/goodnews/goodnewsresourcecontainer.class.php exists but there is no such file as modprocessor.class.php in the core/model directory.

So I’m thinking that maybe in MODX 3 the modprocessor.class.php file has been moved/removed which could be the issue.

Any ideas? I’d like my Resource tree back :slight_smile:

Maybe try deactivating the GoodNews plugin (in the “Elements” tab or maybe directly in the database table modx_site_plugins).

Yes in MODX 3 the files are now in core/src/Revolution/...

Thanks… I’ve tried doing this but the same problem remains. I’ve disabled in the Elements tab and I’ve checked the DB to ensure it’s been disabled but the Resource tree still doesn’t show and I can’t for the life of me remove all the Goodnews artefacts from the system, even if I try deleting manually via the Modx interface.
Not being able to see the resource tree is my major problem at the moment as the client can’t add or update anything :frowning:
Any other suggestions?
EDIT: I’ve found a similar issue discussed here: Error while loading resource tree MODX 3 · Issue #335 · modxcms/Collections · GitHub but it appears to be fixed so I’m thinking the GoodNews plugin changed something fundamental when installed.

It looks like GoodNews adds itself to the system setting extension_packages. Maybe this is the problem. Try removing it.

Also try deleting the cache (directory core/cache), if you haven’t done that.

That was the fix… thanks for your help with that! Hope I can reciprocate some time :slight_smile:

A new version of GoodNews 1.6.1-pl is now online and available via MODX extras provider!
The new version is still only built for MODX 2.3.x up to 2.8.x.

This release is the preparation for the further development of a MODX 3 compatible version. Since GoodNews is a comprehensive extra, further development for MODX 3 will be done in a separate version.
The existing MODX 2 compatible version will no longer receive feature updates. However, bug fixes and security patches will be included.

The MODX 3+ version of GoodNews will be developed in a separate package and the “old” version will be deprecated in a few months. Any hints on how I should name the new package?

GoodNews 2 (boring?)
BreakingNews (which would have a nice touch as it will break compatibility with MODX 2)

What do you think?


:+1:

MoreGoodNews has a hopeful ring to it


:grinning:

BetterNews - Better is an upgrade on Good :wink:

2 Likes

I am currently thinking about how the development environment for the GoodNews MODX add-on should look like if I want to develop in two separate versions (one for MODX 2.3+ and one for MODX 3.x+).

  • in the same repository with 2 different branches (which would be a pain in the ass in my local dev-environment as testing in the different MODX versions means manually copying files)?

  • a separate repository for each version and naming the new package differently and keep the internal class names the same or change them to the new package name?

Somehow I don’t know how to do this…

This name could also collide with @markh 's company modmore… :innocent:

1 Like

My environment looks like this:

  • development.local
    • 2.x (modx git install of 2.x branch)
    • 3.x (modx git install of 3.x branch)
    • ProjectName (git root of my project)

This allows easy switching in ProjectName between different branches. There’s a config.core.php in the root of ProjectName that I can switch between 2.x/3.x to identify which core to use. Both 2.x and 3.x point to the same code base in ProjectName.

That setup is basically what’s described in the Developing an Extra tutorial, but then with an extra 2.x/3.x layer for different MODX installations.

While boring, if you’ll have an upgrade path from the 2.x to the 3.x version I’d suggest sticking with GoodNews 2. If an upgrade path isn’t possible then a rename makes sense. BetterNews would be a great name in that case!

I don’t have the “More”-prefix trademarked so wouldn’t be able to stop you from using that if I wanted to, and it’s also not something we use for all extras (just MoreGallery and the “more for modx” motto)… yeah that does could give the suggestion modmore is involved which would be nice to avoid. :wink:

2 Likes

This looks very reasonable Mark! Thanks for this hint!

Using your method, I can develop different project versions (one version for MODX 2 and one for MODX 3) in a single GitHub library by simply switching branches - which is what I need for GoodNews. Don’t even need to change config.core.php, as each branch can hold its own config.core - or do I miss something?

It could, but I don’t tend to commit config.core.php as it may be different for different people working on the project, or on different computers.

Ah, that’s true. I have not thought about it.

GoodNews v2.0.0-alpha1 is ready!

I am happy to announce that GoodNews is now available in version 2.0.0-alpha1! GoodNews v2 is completely refactored for MODX 3 only. That was a hard piece of work… :slight_smile:

Currently the new transport package can only be installed manually.

Download here!

I would be happy if you could test the new version. Please send feedback and bug reports via:

Here is the changelog:

[2.0.0-alpha1] - 2023-01-31

Added

  • [#50] implemented detailed error text in send-log

Changed

  • completely refactored for MODX 3 (as standalone version; currently no upgrade path!)

Fixed

  • fixed deprecated PHP each() usage for PHP8+ in snippets (GoodNewsGetNewsletters and GoodNewsContentCollection)
  • removed deprecated use of strftime (PHP8+)
  • security: changed registry key to md5 hash in subscription process
1 Like

This is truly Good News. I use this extra on a couple of sites and love how it works. One site is simple enough that’s it’s a candidate for upgrade to MODX 3, whenever all its extras are updated to work in 3.0.