modmore / Gitify

Command line toolkit to make managing a MODX site in git a lot easier.
MIT License
122 stars 55 forks source link

Collections 4.0.0-pl not extractable any more #441

Closed wuuti closed 10 months ago

wuuti commented 1 year ago

Summary

With version 4.0.0-pl of Collections the model/ folder was removed (it was there in the previous versions?). As a consequence, extracting (and building) of Collections is not possible any more.

Step to reproduce

Observed behavior

Extracting gives error: xPDO.php : 472) Path specified for package collections is not a valid or accessible directory: [snip]/core/components/collections/model

Expected behavior

Package data should be loadable even if model folder does not exist (but "src/Model"?). Or is it a Collections bug here, that they stripped the model folder?

I was not able to solve that on my own, e.g. by using package_path or service in the gitify config... A tmp workaround was to just copy the model folder from older versions - but thats clearly not a solution.

Environment

Gitify version: 2.0.0-alpha4 (not tested yet with current release) Modx-Version: 3.0.1

jenswittmann commented 11 months ago

I have a similar issue with Formalicious.

formalicious_fields_types:
        class: FormaliciousFieldType
        primary: id
        package: formalicious

Getting this Error with Gitify 2.0.1-pl on MODX 3.0.4:

(ERROR @ core/vendor/xpdo/xpdo/src/xPDO/xPDO.php : 473) Path specified for package formalicious is not a valid or accessible directory: core/components/formalicious/model/

@Mark-H do you have an idea to fix this? #bugbounty

Mark-H commented 11 months ago

The problem is likely the upgrades to xPDO 3 which suggests a new way of setting up the model, often in /core/components/package/src/Model/ or something like it.

If it doesn't work with service nor specifying the package_path to something like core/components/collections/src/Model/ then this code needs to be adjusted further to be able of recognising these new model locations/patterns. Perhaps we need to specify namespace.

I'm fully booked with ContentBlocks 2 at the moment but if you're able to sponsor up to a few hours of work I can see if we can get it on Murray's calendar before the end of the year.

jenswittmann commented 11 months ago

@Mark-H i made a little donation via https://modmore.com/gitifywatch/donate/ to fix this. If it is on your list for the beginning of next year, i'm totally fine.

@wuuti are you also on the boat?

Mark-H commented 11 months ago

Thanks @jenswittmann - much appreciated. I've added it to Murray's to do list to look at soon.