Problem/Motivation

When using the AI CKEditor integration on Acquia Cloud, an error is triggered during response generation due to serialization of an object referencing the Settings object indirectly via the LoggerChannelInterface.

Steps to reproduce

  1. Enable the ai_ckeditor module.
  2. Add “Generate with AI” plugin to a CKEditor text format.
  3. Use this text format in any entity form (e.g., node or block).
  4. Click the Generate button in the CKEditor plugin’s modal form.
  5. The error should occur at this point: LogicException: Settings cannot be serialized.

Proposed resolution

Replace the LoggerChannelInterface dependency with LoggerChannelFactoryInterface and reflect the update to all the plugin instances.

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork ai-3525319

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

saxenaakansha30 created an issue. See original summary.

saxenaakansha30’s picture

Title: CKEditor Plugin Base Throws LogicException on Acquia Cloud – Replace LoggerChannelInterface with LoggerChannelFactoryInterface » CKEditor Plugin Base Throws LogicException on Acquia Cloud
saxenaakansha30’s picture

StatusFileSize
new5.67 KB
anjaliprasannan’s picture

Assigned: Unassigned » anjaliprasannan

anjaliprasannan’s picture

Assigned: anjaliprasannan » Unassigned
Status: Active » Needs review

Converted the patch to MR. Needs review in acquia cloud.

marcus_johansson made their first commit to this issue’s fork.

marcus_johansson’s picture

Version: 1.1.0-beta1 » 1.2.x-dev
Status: Needs review » Fixed

Tested and error logging is still working, sorry for the long wait on this. Going into 1.2.x. Thank you everyone.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

koppie made their first commit to this issue’s fork.

koppie’s picture

Bad news:

  • Looks like the MR was never actually merged
  • There's a merge conflict with the upstream dev branch now (the patch doesn't apply cleanly any more)

Solution: New patch! I just pushed to the MR.

Can we get this merged? Pretty please?? :-D

koppie’s picture

StatusFileSize
new7.75 KB

Sorry, I can't figure out how to download a patchfile from drupalcode.org that works with composer. I get these weird "combined" patchfiles that don't apply cleanly.

So, here's a manual patchfile, for anyone who needs it!

Final note: This isn't just an issue on Acquia Cloud. I'm encountering it on a self-hosted kubernetes cluster too.

marcus_johansson’s picture

Status: Closed (fixed) » Reviewed & tested by the community

Sorry about that - this looks good, and I will now make sure the merge is there.

marcus_johansson’s picture

Status: Reviewed & tested by the community » Fixed

This is really merged this time.

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.