Project

General

Profile

Actions

Support #16509

closed

custom-css-js plugin request

Added by Marilyn Weber over 1 year ago. Updated over 1 year ago.

Status:
Resolved
Priority name:
Normal
Assignee:
Category name:
Shortcodes and embeds
Target version:
Start date:
2022-07-25
Due date:
% Done:

0%

Estimated time:
Deployment actions:

Description

Via D:

I am Ned Benton and the site I am asking for assistance about is https://nesri.commons.gc.cuny.edu/

I need the following plug-in:

https://wordpress.org/plugins/custom-css-js/

The ability to embed javascript instructions to external database tables from Caspio.com into posts and pages.

Can you install this on the commons so it can be available to my site.

Actions #1

Updated by Boone Gorges over 1 year ago

  • Status changed from New to Reporter Feedback

For security reasons, we are unable to provide plugins that allow site administrators to post arbitrary JavaScript.

We may be able to help with a custom embed tool. I'd first need more information about how Caspio embedding works. Could the user please provide details on the kinds of JavaScript they were planning to use, or perhaps point to some documentation from Caspio on how one of their documents can be embedded?

Actions #2

Updated by Marilyn Weber over 1 year ago

Thanks! Will let him know.

Actions #3

Updated by Marilyn Weber over 1 year ago

He replies:

"
Ned Benton
Today ‪04:01 pm‬

Boone:

This is about the Northeast Slavery records Index, at https://nesri.commons.gc.cuny.edu/ (https://urldefense.com/v3/__https:/nesri.commons.gc.cuny.edu/__;!!Ky_hqJ5n-ILn0fk!CGpLSuttlKNW9dA0vSePpsCNxhuiWRJl-o6O9wtg9MOqYaRcbHdgIEjQVC5qpEEadGJ4VGUZCpGIrYxlNgk2o5XfE263EtPh$) .

Our database service is Caspio.com, and they have a plug-in described here which I installed 3 years ago.

https://blog.caspio.com/new-and-improved-caspio-wordpress-plugin/

This is critical for our service. For example, if you go here https://blog.caspio.com/new-and-improved-caspio-wordpress-plugin/

And select State = MA and County = Suffolk your will get a report on Suffolk county that includes a lot of pivot tables produced on wordpress pages with the plug-in code.

Now they want to cease to support the Caspio plug in. They say:

Announced on June 23, 2022

Caspio’s standard Embed deployment method has been improved for WordPress environments. Therefore, beginning on October 3, 2022, the WordPress deployment method will be deprecated and this option will be removed from the deployment screen.

Existing WordPress deployments will continue to function until December 1, 2023. After this date, DataPages with WordPress deployment will no longer load. If you are currently using the Caspio WordPress Plugin (https://www.caspio.com/wordpress) for deployment on your website, replace all WordPress shortcodes with the standard Embed deployment method to avoid interruption to your applications.

I have been working with their technical support because there standard Embed deployment does not work on CUNY Commons. This was one of my communications to them:

I am using the non-commercial version of Wordpress, on a City Universityof New York website.

Wordpress will not allow me to update a page with this code in it.

<script type="text/javascript" src=https://c0abd177.caspio.com/dp/ab865000bbc1662d4da942af8a60/emb></script>

When I try it deletes the code.

I generated the code by disabling and then enabling the database, selecting the "Embed" mode and copying it in.

NB

They say that this plug-in will solve the problem: https://wordpress.org/plugins/custom-css-js/ (https://urldefense.com/v3/__https:/wordpress.org/plugins/custom-css-js/__;!!Ky_hqJ5n-ILn0fk!CGpLSuttlKNW9dA0vSePpsCNxhuiWRJl-o6O9wtg9MOqYaRcbHdgIEjQVC5qpEEadGJ4VGUZCpGIrYxlNgk2o5XfE7THfuwl$)

Does this help in explaining the issue?"

Actions #4

Updated by Boone Gorges over 1 year ago

  • Category name set to Shortcodes and embeds
  • Status changed from Reporter Feedback to Staged for Production Release
  • Assignee set to Boone Gorges
  • Target version set to 2.0.4

Thanks for the additional details.

The issue is that <script> tags cannot be entered into the WordPress editor on the Commons, for security reasons.

I've written a custom handler for Caspio embeds, which will be included in today's release. To use, go to the Deploy tab https://howto.caspio.com/deployment/deployment/. Copy the src attribute from the script tag (it will be a URL of the format https://abcdefg.caspio.com/[...]/emb. Then, paste that URL on its own line in the WordPress editor.

I encourage Ned to switch his site to this technique after today's release (by noon EDT) and let us know if it's successful. If so, we can probably get rid of the deprecated Caspio plugin.

Actions #6

Updated by Boone Gorges over 1 year ago

  • Status changed from Staged for Production Release to Resolved
Actions #7

Updated by Marilyn Weber over 1 year ago

Ned replies "This works. Thank you very much.
Later today or tomorrow I will test this with our community report which has a series of tables. I expect it to work but it would be a strong test.
I also want to communicate to Caspio so they are aware of your solution.
Is your custom handler necessary specifically because of the steps taken in the Commons to restrict script tags? If that is the case them my problem was specific to CUNY Commons.
However, if restricting script tags is a common security measure then Caspio should be aware."

Actions #8

Updated by Boone Gorges over 1 year ago

Is your custom handler necessary specifically because of the steps taken in the Commons to restrict script tags? If that is the case them my problem was specific to CUNY Commons.

Forbidding script tags is a common security precaution, which is enabled by default on any WordPress Multisite installation. So this is a problem that's likely to arise for anyone attempting to use their script to embed in WP Multisite, which includes many university websites.

Actions

Also available in: Atom PDF