-
Notifications
You must be signed in to change notification settings - Fork 31
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
Refactor for MODX 3 (for a separate branch to the current 2.x) #156
Conversation
The following PRs for core and Archivist need to be made for this to work properly too: |
@muzzwood thanks for helping out! Do you want me to create a separate branch for these changes? |
Oh a separate branch would be fantastic, thanks! :) |
@muzzwood done |
This pull request has been mentioned on MODX Community. There might be relevant details there: https://community.modx.com/t/upgrademodx-working-to-upgrade-to-modx-3/5017/2 |
@muzzwood amazing work! I'll try my best to test it sometime in the upcoming days. |
@muzzwood any idea why this is happening? |
Is Quip MODX 3 compatible? |
Huh. Not sure what's going on there - some form of escaping perhaps? I know Articles hard-codes a bunch of snippet calls into its templates. I'll look into that tomorrow. |
This is an odd one... Any uncached snippet tags added to the template won't be parsed. |
@muzzwood The template refers to placeholders like The values of these placeholders are set here: Articles/core/components/articles/src/Model/Article.php Lines 38 to 40 in 266a6e7
I think the parser is doing something odd. |
Yeah it's interfering somewhere with the parser but I haven't worked out where yet. 😅 It affects any uncached snippet at all. You can create a new snippet, add it to a template that Articles is using, and you'll see it there unparsed. |
If you create a new resource (document) with template So my guess is that, since a regular resource parses it just fine and
|
I've spent a couple of hours this afternoon trying to solve it but no luck. While comments are disabled, the issue doesn't show itself and all other snippets work properly. I've tried the same Quip calls on a non-Articles resource/template and they work fine. So it's not Quip by itself that has the problem I think. |
@muzzwood I found the solution, some of the placeholders in the templates should be uncached, e.g
|
Well done @JoshuaLuckers! I can confirm that works - I just pushed the change. I'm still not entirely sure why that's happening though... 🤔. I would have thought the values would just end up cached rather than the tags themselves not being parsed. I think this is at a good enough stage for an alpha v3 release. Quip and Archivist probably still need some tweaks though. |
I really appreciate you helping out! I think we should add you as a sponsor of this update in the release notes! |
Hey, my pleasure! Thanks for all you do too, Joshua. 😃 |
Sounds good to me! |
This pull request has been mentioned on MODX Community. There might be relevant details there: |
It's in a working state after the refactor. Still a work in progress though. Some of the update/notification services may not yet be working.
I also need to redo the build script and get a resolver together to update the resource class_key fields in the database.