Error: Class Drupal\akamai\Ccu3Client not found in akamai_get_client()
Ccu3Client.php class is defined inside src folder and those classes defined inside src folder are giving "class not found" error when it call.

Comments

supriya1992 created an issue. See original summary.

supriya1992’s picture

Assigned: Unassigned » supriya1992
supriya1992’s picture

StatusFileSize
new15.89 KB

I am facing issue when calling Ccu3client class inside akamai_get_client().
I found that src folder class is not directly calling inside module that is why I have created a patch for this. This will resolved the issue.

supriya1992’s picture

Status: Active » Needs review
supriya1992’s picture

Priority: Critical » Major
supriya1992’s picture

Priority: Major » Minor
supriya1992’s picture

Priority: Minor » Critical
firewaller’s picture

Attached is a patch that includes the existing class files rather than creating new instances. This seems to be happening elsewhere and is somehow environment dependent (see related issue).

firewaller’s picture

StatusFileSize
new1.9 KB

Attached is an appropriately generated patch.

firewaller’s picture

StatusFileSize
new2.17 KB

Updated patch including fix for Error: Class 'Drupal\akamai\Batch' not found in Drupal\akamai\Batcher->getBatch().

cameron tod’s picture

Thanks for the patch firewaller and supriya1992. I think we need to ensure that the classes can be loaded dynamically via PSR-4, rather than explicitly including the files.

supriya1992’s picture

@Cameron Tod, I have checked the condition that if PSR4 module does not exist then add the classes to class.inc file otherwise not.
@firewaller, I already used this solution but still I was getting error that class does not exist.

supriya1992’s picture

StatusFileSize
new453 bytes

I have uploaded one more patch that have to apply with old one.

pobster’s picture

I agree with Cameron here, the module just needs to be installed correctly.

pobster’s picture

Status: Needs review » Closed (works as designed)

I'm going to close this, the issue really is that the documentation needs to be better and there's already a ticket for that.