Articles
Articles copied to clipboard
will there be a version for modx 3?
Feature request
Summary
Quick summary what's this feature request about.
Why is it needed?
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Suggested solution(s)
A clear and concise description of what you want to happen.
Related issue(s)/PR(s)
Let us know if this is related to any issue/pull request.
Support for 3.x is a work in progress. Any help is welcome, you can use the develop branch to help test and submit issues and/or PR's!
This issue has been mentioned on MODX Community. There might be relevant details there:
https://community.modx.com/t/need-help-with-mystery-connector-500-error/4978/6
The error Ryan is talking about caused a completely empty resource tree. Commenting out the three "require_once" lines in the ArticlesContainer class fixed that (though Articles itself still doesn't work).
That's probably been fixed with https://github.com/modxcms/Articles/commit/aaba11345c4cfda76f0a5872f5eb439878584c5d but there hasn't been a release yet I think.
Any help with testing the things that are already done in the develop branch that would be great! Especially for those upgrading from an existing installation with Articles. But always make a backup!
I had some time today to look into 3.x compatibility. I pushed some changes to the develop branch, installing it in 3.x still gives some errors. Most likely related to the validators in _build/resolvers/validators
:
Could not get table class for class: modTransportPackage
Could not get table name for class: modTransportPackage
If someone knows a fix for this, please feel free to submit a PR. Otherwise I'll look into it myself sometime in the upcoming week.
Thanks to @Mark-H I've solved the issue with the resolvers and validators.
There is still some work to do:
- Quip isn't ready for 3.x yet and therefore can't be installed.
- Load the Articles service using bootstrap.php since
extension_packages
is no longer being used in 3.x
The ArticlesContainer isn't recognized as Document Type yet. So I have to fix that as well.
Probably because the schema is still for 2.x, but I want to maintain backwards compatibility with 2.x without releasing a separate version for 3.x. Any suggestions are welcome!
Hey @JoshuaLuckers 👋🏻 I was playing around trying to get the Articles derivative modResource classes to be loaded in both 2.x and 3.x but haven't had much luck. 😅
It could be that having a separate version for 3.x is the easier (possible) path... if you're open to it? The main consideration I think would be to make sure the current version doesn't cause any errors during an upgrade from MODX 2.x -> 3.x, and then the user would upgrade to the 3.x version via the package manager after the MODX upgrade is complete.
What do you reckon?
@muzzwood Thanks a lot for taking time to help out!
It could be that having a separate version for 3.x is the easier (possible) path... if you're open to it? The main consideration I think would be to make sure the current version doesn't cause any errors during an upgrade from MODX 2.x -> 3.x, and then the user would upgrade to the 3.x version via the package manager after the MODX upgrade is complete.
That seems like a good enough solution for me!
Awesome! I'll get a PR together for you ;)
WIP draft is here https://github.com/modxcms/Articles/pull/156 Can't be packaged yet but I hope to get that done later today.
@muzzwood I've merged your PR. I'll try to update the changelog tomorrow and submit an alpha release of it.
Great work guys!
Sorry guys I didn't manage to put out a new release. I hope to do it soon. @muzzwood but feel free to put out a new release if you have more time for it.
Hey @JoshuaLuckers, sorry for not replying sooner, it's been a crazy week. I could do a build/changelog and put through a PR for it but I'd need access for any more than that. ;)
Now that I think of it, we probably need to do the two releases (MODX 2.x and 3.x).
@muzzwood if you have time to do that, that would be awesome and greatly appreciated. The little one is sick so my time is really limited but I can create a new release if you would be able to prepare it <3
I've had good luck converting my extras to run in both MODX 2 and MODX3. Is there something unusual about Articles that makes that difficult? A single version would be a lot easier to maintain.
Custom resource types are tough to get cross compatible due to some minor signature changes on the resource, and needing to extend either modResource or \MODX\Revolution\modResource - can't extend both at the same time in a single class.
I'm working on a blog post about this, but here's the short version:
You can create a dynamic parent class that extends modResource in MODX 2 and \MODX\Revolution\modResource in MODX 3. Then the Articles class can extend the dynamic parent. I've had to do this with a couple of extras.
Here's an example of the Processor code from Notify:
if (class_exists('MODX\Revolution\Processors\Processor')) {
abstract class DynamicProcessorParent extends MODX\Revolution\Processors\Processor {
}
} else {
abstract class DynamicProcessorParent extends modProcessor {
}
}
class NfSendEmailProcessor extends DynamicProcessorParent {
/* Class code */
}
There where also some issues with the model, schema en meta files that caused some issues with that approach. It's an approach we tried first.
@muzzwood if you have time to do that, that would be awesome and greatly appreciated. The little one is sick so my time is really limited but I can create a new release if you would be able to prepare it <3
Aiming to get that sorted tomorrow morning 👍🏻
This issue has been mentioned on MODX Community. There might be relevant details there:
https://community.modx.com/t/modx3-after-update-all-resources-in-web-vanished-suspected-issues-with-articles/5141/2
2.x package: https://github.com/modxcms/Articles/pull/158 3.x package: https://github.com/modxcms/Articles/pull/157
Thanks to the amazing work of @muzzwood and sponsorship of modmore, I released an alpha release for Articles 2.0 with support for MODX 3.
I upgraded article to 1.8.0. then upgraded site to 3.0. Isee the 2.0 alpha package but cannot install it. Getting error Could not download and create transport package with signature: articles-2.0.0-alpha1
I upgraded article to 1.8.0. then upgraded site to 3.0. Isee the 2.0 alpha package but cannot install it. Getting error Could not download and create transport package with signature: articles-2.0.0-alpha1
That's odd, I'll investigate it.
You can try to download the package and install it manually: https://github.com/modxcms/Articles/blob/develop-3x/_packages/articles-2.0.0-alpha1.transport.zip
I updated to 1.8.0 without issues. Thanks for good work.
Quip is quite often used with Articles. That prevents from upgrading to MODX3. Will Quip be made MODX3 compatible? Migrating to another commenting system is an option too but continueing to use use Quip would be the easiest solution.
Quip still needs some tweaks to work fully (it gives errors in the log about modAction when running on MODX3). @nsuomine if you're able to try upgrading a clone of your site to 3.0, and report any issues you face with Quip, I'd be happy to try solving them.
@muzzwood Thanks for offering help.
Yes, Quip gives many warnings on 2.8.3 too but it still works. I understood that there is no more support for modAction in 3.0 so Quip would get broken? Do you think it would still work with the same warnings in the log.