Search

Hi,

I have installed the ckeditor extension, enabled it for some section, created content. When I try to access the page I get this:

Fatal error: Class ‘Administration’ not found in /extensions/ckeditor/extension.driver.php on line 114

Thank you, Dima

What version of Symphony are you using?

2.1.2

I don’t understand why it is getting there, the function applyCKEditor is delegate for backend, but the error appears when I try to access the page itself.

Same problem with TinyMCE extension:

Fatal error: Class ‘Administration’ not found in APP_PATH/extension.driver.php on line 33

Have you checked if this issue is caused by another extension you are using?

Are you running the Cachelite extension?

If so, have you updated to the latest version?

I don’t use Cachelite.
I found that both CKEditor and TinyMCE register callbacks for /backend/ page. Now when rendering the backend it seems to work - the editor appears in textarea as it should. The error comes when I access the corresponding frontend page.
Looks like the function registered for backend fires for frontend as well. This is weird. I’m gonna dive into notifyMembers functionality, will post my findings soon.

OK
The problem was caused by sectionschema extension. I use it to implement tag could in the blog page, so when the page is being rendered, the sectionschema datasource loads the publish page of my blog section (to figure out the schema). This triggered the callback registered for backend (the one that actually inserts CKEditor into the page). In the context of frontpage generation this callback could not find Administration class.
My workaround for time being is to add ‘textarea’ to $incompatible_publishpanel array so no schema is generated for this field.
This is ok in mu current situation, although for the future some better solution is needed.

Thanks, Dima

Sorry I wasn’t able to diagnose this. It has already been partly reported on the Section Schemas thread. Unfortunately there isn’t really any other solution right now. Section Schemas calls the displayPublishPanel method on each field, which was only ever intended to be called in the context of the backend (Administration) and not front (Frontend). So when you apply a CKEditor to a Textarea, CKEditor uses the administration class which doesn’t exist in the frontend context.

Would replacing Administration::instance() with Symphony::Engine() make any difference?

Symphony::Engine has been implemented in Symphony 2.2beta, and not 2.1.2. I think. But yep, in the future this should solve the problem.

Nick’s nailed the reason behind this, so again, extension developers should take 5 minutes over coffee to read this article to help update their extensions.

In my opinion, the proper fix would be an API to retrieve section schema, so the Section Schema extension will not have to do what it does now - loading publish page to obtain the schema. Does anybody knows about plans to have in near future?

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details