Publisher does not support the Fluid field type. Please do not contact asking when support will be available.

If you purchased an add-on from expressionengine.com, be sure to visit boldminded.com/claim to add the license to your account here on boldminded.com.

Ticket: Error Unable to load the requested class: cartthrob_addons

Status Resolved
Add-on / Version Publisher Lite 3.6.0
Severity
EE Version 6.3.4

Simon Andersohn

Jul 19, 2022

I’ve installed Publisher Lite on a development server as well as a bare bones test site with only the following addons installed:

cartthrob
cartthrob_order_manager
fieldpack
matrix
publisher

The installation works fine and setup is complete. However, when I add an item to cart with CartThrob, I get this message:

Error
Unable to load the requested class: cartthrob_addons

Looking at this, I guess it’s something to do with ee()->load->add_package_path(PATH_THIRD . ‘publisher/legacy/’); in sessions_start() within the extension file, when then overrides other library/model calls from other addons.

This affects the entire site until the cookies are cleared (when the cart is empty).

Kind regards
Simon Andersohn

#1

BoldMinded (Brian)

Jul 23, 2022

Hi, Simon. Sorry I haven’t responded sooner, I’ve been on vacation. So this has come up before and I this is actually a copy/paste of an email I sent to the Carthrob devs.

I’ve seen this cause issues in the past, and Publisher has been the victim of it before too, it all depends on the load order. Honestly I feel like this is something that should be fixed in EE’s core and I’m not sure why it’s still an issue, or even an issue to begin with. It should be adding to a loading path, not removing from or resetting loading paths, which it appears to be doing.

At the end of Publisher’s session_start hook you could try adding remove path to see if they both still work?

ee()->load->remove_package_path(PATH_THIRD . ‘publisher/legacy/’);

This is an EE issue IMO, not a Publisher or Cartthrob issue. The remove_package_path method is a public method and is being used in exactly the manor it is intended, however, EE appears to be removing classes from the available list that were previously added each time it is called.

 

#2

BoldMinded (Brian)

Jul 23, 2022

It seems suspicious to me that the only add-on that I’m seeing this error with is Cartthrob. I don’t see this happening with anything else, so to me this is either an EE core issue, or a Cartthrob issue.

#3

BoldMinded (Brian)

Jul 23, 2022

Can you send me a build of Carththrob so I can take a look at it? Put it on Dropbox or somewhere and link to it in a private message.

#4

Simon Andersohn

Jul 25, 2022

Comment has been marked private.

#5

BoldMinded (Brian)

Jul 25, 2022

Simon, I edited your ticket to remove the login credentials in the comment. Please edit the ticket and use the provided fields to share sensitive information. When the ticket is resolved/closed, that information will be delete from my database, I don’t want such information living forever in a comment.

#6

Simon Andersohn

Jul 25, 2022

Comment has been marked private.

#7

BoldMinded (Brian)

Jul 25, 2022

So, just to clarify, why do I need to login now? You made it sound like the changes from the CT team fixed the issue.

#8

Simon Andersohn

Jul 25, 2022

Sorry for any confusion. I know that I’ve only just got back to you just after CartThrob’s solution. My intention was to give you an update on this where we were with all this.

This where I thought it would be simpler to give you access to the development server rather than send you files since you asked:
“Can you send me a build of Carththrob so I can take a look at it? Put it on Dropbox or somewhere and link to it in a private message.”

I commented out the fix that CartThrob provided and (add some comments to it) in case you wanted to see it for yourself.

Given that CartThrob fix works, you don’t need to do anything, However the other issues I mention are still a problem at my end. Would it be worth opening a separate ticket for these instead? I’ve had Publisher Lite since January and still haven’t been able to get it to work on any of development server without some issue so hoping that I can have it working 100% before deploying to the live server. I can give more details of the setup if you require too.

Many thanks
Simon.

#9

BoldMinded (Brian)

Jul 25, 2022

I made a few changes to my copy of Publisher based on that feedback from the CT team, so if that part is resolved on your end, keep the changes they made. If there are other issues you’re having then yes, please create a separate ticket.

#10

Simon Andersohn

Jul 26, 2022

Understood, thank you Brian.

I’ll open a separate ticket for the other issues.

Kind regards
Simon

Login to reply