Jump to content


Photo

disable_js_injection


When disable_js_injection is set true, blocks are still getting empty <script></script> tags added when embedded in page templates.

If the block is added to a page directly then no additional tags are added.

This is causing problems particularly for items such as the ipcontent_files block which is often embedded within "src" attributes and thus braking layouts.

Status: Fixed
Version: 2.3.1
Fixed In: 2.3.2


11 Comments

I would like to voice that IF anything can be done for this, please do.... Custom PHP Blocks by no means should have this added...... and I've encountered quite a few issues with this already that go beyond the mentioned block..... PHP Blocks that actually don't even return anything but are cached query holders are still adding this.
This bug report came from the result of me supporting a ticket. When updated to IPC 2.3.1 my home website no longer loaded any images when I was using the media files block both within my Page Template and the individual pages that uses that same Page Template.

As of right now with 2.3.1, it's impossible to use the media files block in both a Page Template and that template's individual pages so I have to actually hardcode the specific URLs for any images, files, and whatever else media I have stored in the block. It's pretty much useless right now since that is a huge inconvenience.

This bug report came from the result of me supporting a ticket. When updated to IPC 2.3.1 my home website no longer loaded any images when I was using the media files block both within my Page Template and the individual pages that uses that same Page Template.As of right now with 2.3.1, it's impossible to use the media files block in both a Page Template and that template's individual pages so I have to actually hardcode the specific URLs for any images, files, and whatever else media I have stored in the block. It's pretty much useless right now since that is a huge inconvenience.

The block is redundant now Stars..... just {parse ipcmedia=""}
http://community.inv...-in-ipc-23-r615
Thanks Marcher, I too had missed that.
What goes in between the quotes, the path and name of the file that I am linking to?

I'm assuming that ipcmedia loads the path to ccs_files? It's a shame the media block is useless because it was nice just being able to click a button and have it inserted into where my cursor was. Now I have to type in or paste this new parse everytime.
I was on my phone when posting that so I didn't see the link on how to use it.

Hopefully the media block will be fixed and become useful again lol
http://community.inv...t/#entry2255222
:ph34r:
See ccsFunctions->injectBlockFramework
... see /xml/ccs_settings.xml
.... confused... but able to load it locally now... is that supposed to be a setting?
No, this is NOT intended to be an ACP-accessible setting. It's a hidden feature, primarily useful when you are explicitly manually loading the needed resources in your front end designs. It was built in primarily to allow developers who are embedding blocks into external websites to shut off the auto-injection.

I will investigate this specific report, but no, the setting should not be included.
This actually shouldn't be a problem in 2.3.1, regardless of the setting. The admin/sources/template_plugins/tp_block.php file was updated to resolve this issue, by appending the script tags to the beginning of the output (as opposed to where-ever the block is embedded specifically).

In any event, I have added code to allow the template engine not to add the empty script tags if disable_js_injection is enabled.
This error still exists in IP.Content 2.3.2. Here is an example on one of my sites: http://www.thepriceo...ity2/index.html

This error still exists in IP.Content 2.3.2. Here is an example on one of my sites: http://www.thepriceo...ity2/index.html

http://community.invisionpower.com/resources/documentation/index.html/_/developer-resources/ip-content/disabling-javascript-injection-r759
My mods code checks this as well.... if you turn that on and it still occurs then I would submit a ticket, if not, you should be doing as I said and stop using blocks in image/link/script tags.... or manually loading it if you insist.

The block is redundant now Stars..... just {parse ipcmedia=""}
http://community.inv...-in-ipc-23-r615