Uncaught SyntaxError: Unexpected token '.'* on Adding or Editing a SP Page - Forum | JoomShaper
Staff replied SP Page Builder

Uncaught SyntaxError: Unexpected token '.'* on Adding or Editing a SP Page

Asked by Lee Chi Wai 4 years ago Last activity 4 years ago

Hi!

Getting this error when adding or editing a SP Page
"index.php?option=com_sppagebuilder&view=page&layout=edit&id=126:218 Uncaught SyntaxError: Unexpected token '.'"

Line 218 is contains ".tox-tinymce-aux {z-index: 130012 !important;}"

  1. This is on a website recently upgraded to Joomla 4. Using the re-installed SP Pagebuilder extension too.
  2. I've also installed Magnin Quick Starter but this error doesnt appear.

Anyone know what is wrong?

Thanks!

7 replies

Toufiq Senior Staff

Hi there,

Thanks for contacting us. Sorry for the inconvenience. Will you please provide me the Joomla administrator access to check the issue? I will check & get back to you soon. 

Note: Did you disable the TinyMCE editor? If yes, Please enable the TinyMCE editor. Also, select the TinyMCE from global configuration.

-Thanks

Lee Chi Wai Asked this

Hi Toufiq,

I double checked, the TinyMCE editor is not disabled. It's the default editor.

I also double checked in the Magnin Quickstart installation. The error does appear. Are you able to check that? I am unable to give you admin access at the moment.

Thanks!

Lee Chi Wai Asked this
4 years ago · edited

Hi Toufiq,

  1. I installed the Quickstarter for both Magnin and Pitech.
  2. As it is, Magnin gives the above error. Pitech doesn't.
  3. Magnin SP Page Builder v3.8.3. Pitech is v3.7.10.
  4. I installed v3.8.1 into Magnin and it cleared the error.

Can you download the Magnin quickstarter and install it from your end? You will see the error.

The error only appears on Joomla 4 installations. Other websites running Joomla v3.10.x with SP Page Builder v3.8.3 doesnt have this error.

Thanks!

Toufiq Senior Staff

Installed quickstart pack and it works fine.

Lee Chi Wai Asked this

Hi Toufiq,

Think I solved the bug.

In file administrator/components/com_sppagebuilder/helpers/sppagebuilder.php, line 137 is

$doc->addScriptDeclaration('.tox-tinymce-aux {z-index: 130012 !important;}');

So just need to change to

$doc->addStyleDeclaration('.tox-tinymce-aux {z-index: 130012 !important;}');

Thanks!
Jason

Toufiq Senior Staff

I have informed to our developer. I hope they will check. Thanks

Log in to reply.