Custom Package installation error


I’m trying to install a custom package that works fine in Concrete v8 but not in the newest Concrete version(9) it’s failing when it attempts to do the swap content and the installation process is not showing any error even in the PHP-fpm error logs. This is what’s happening.

Is there a way to troubleshoot the package installation process?

Thanks in advance!

A typical v8 to v9 issue for packages is the need to call parent methods that didn’t exist in v8, such as on_start in a dashboard page controller.

Thanks for your response.

Could you please elaborate a bit more ? What parent methods are needed other than the parent::install() that is preventing the swap content to succeed?

In your particular case, I don’t know. I was just offering a generic hint to the kind of things that make a v8 package fail in v9. on_start() often falls into this glitch.

There is a forum thread with contributions from several developers and a lot more detail if you can search back and find it. Probably towards the start of this year or end of last year.

There is also a tutrorial at Add-On Developers: Get Your Add-Ons Ready for Concrete CMS 9.0 :: Concrete CMS

Thanks!! I’ll look into these resources

I’ve been digging more into this issue and I setup Xdebug to step through the installation script, I noticed that it fails when the process is doing the full swap and at some point, it tries to retrieve the locales iterating through the $this->locales in the Concrete\Core\Entity\Site
class but at that point, the locales are empty causing this to end the process without throwing any exception :frowning:

Any thoughts on why is this happening?


Hi @ricardo.gser - just want to get a little more info about your install / package

So it looks like the package you’re working with installs content - I just want to check if either the site you’re swapping the content out of has multilingual enabled or if your package does anything related to multilingual? Just want to rule out of the locale bit has something to do with that.

Hi Evan,

No, it does not do anything related to multilingual which is strange, however, I was able to fix the installation/swap by removing all the custom code I have for this package, somehow it was interfering in this process.

I noticed that concrete has some problems resolving my custom classes in the package, I’m using the $pkgAutoloaderRegistries property to define them, and seems to work but the problem comes when it tries to resolve and autoload the parent classes i.e

Class Dog extends Animal <------ The autoloader cannot resolve parent classes

Here is how I defined them

This is not happening in Concrete 8.x. I’m wondering if this issue has to do with the way I upgraded Concrete from 8.5 to v9 :thinking:

Any ideas on how to solve this will be appreciated.