Forum Activity for @ultrajam

SteveX
@ultrajam
07/29/15 05:46:34AM
2,589 posts

PHP Fatal error: Cannot set directive after finalization


Jamroom Developers

There is a typo on line 1478 of util.php
Quote: emned.allowfullscreen
emned should be embed
updated by @ultrajam: 07/29/15 05:46:57AM
SteveX
@ultrajam
07/28/15 01:21:25PM
2,589 posts

PHP Fatal error: Cannot set directive after finalization


Jamroom Developers

The listener's the only part related to htmlpurifier - the rest is just templates, css and js with a button for using the templates in tinymce.

Why does htmlpurifier run on editor fields on their way out of the database? Shouldn't it clean the html once on save rather than each time a page with editor content is displayed?

We are supporting the full set of bootstrap classes, javascript (data-*) and aria attributes in TinyMCE. If it's in the bootstrap docs it needs to work in TinyMCE, and the accessibility features are essential.

I'm done for the night, so I'll roll back to the previous version of the core for tomorrow day and try this out again tomorrow evening.
SteveX
@ultrajam
07/28/15 12:34:15PM
2,589 posts

PHP Fatal error: Cannot set directive after finalization


Jamroom Developers

Thanks Brian.

No use of autoFinalize anywhere. The listener is just this (abbreviated):

function ujEditorTemplates_html_purifier_listener($_data, $_user, $_conf, $_args, $event)
{ $_elem = $_data->get('HTML.AllowedElements'); // Set additional Bootstrap elements $_elem['abbr'] = 1; $_elem['blockquote'] = 1; $_elem['cite'] = 1; // ...plus a load more of these... $_elem = implode(',', array_keys($_elem)); $_data->set('HTML.AllowedElements', $_elem); $_attr = $_data->get('HTML.AllowedAttributes'); // Set additional Bootstrap attributes $_attr['abbr.title'] = 1; $_attr['cite.title'] = 1; $_attr['blockquote.class'] = 1; // ...plus a load more of these... $_attr = implode(',', array_keys($_attr)); $_data->set('HTML.AllowedAttributes', $_attr); return $_data; }

updated by @ultrajam: 07/28/15 12:34:42PM
SteveX
@ultrajam
07/28/15 11:22:15AM
2,589 posts

PHP Fatal error: Cannot set directive after finalization


Jamroom Developers

Very happy to see the change to add html5 elements to htmlpurifier in the latest core update - Thanks! :)

However, I have a problem with existing pages containing an editor field not loading and throwing a fatal error:
Quote:
[28-Jul-2015 19:01:29 Europe/Dublin] PHP Fatal error: Cannot set directive after finalization invoked on line 329 in file /home/academicskills/public_html/modules/ujEditorTemplates-release-0.6.2/include.php in /home/academicskills/public_html/modules/jrCore-release-5.2.37/contrib/htmlpurifier/HTMLPurifier.standalone.php on line 2607 [x 5]
The code on line 329 adds my bootstrap specific elements and reads:
$_data->set('HTML.AllowedElements', $_elem);

This has been working well up until today's update, do you know if this is something I need to fix within my module or is it something similar to where this error occurred back in December?
https://www.jamroom.net/the-jamroom-network/forum/jamroom-developers/18891/adding-attributes-to-htmlpurifier-in-a-listener
updated by @ultrajam: 09/03/15 02:28:24AM
SteveX
@ultrajam
07/12/15 12:10:24PM
2,589 posts

HTML Tags Being Removed


Design and Skin Customization

There was a similar issue with ul lists - my fix for that was to enter the list all on one line, so you could give that a try with the figure and figcaption.
https://www.jamroom.net/the-jamroom-network/forum/my_posts/30834/textarea-ul-list-on-multiple-lines-fails-allowed_html-validation
updated by @ultrajam: 07/12/15 12:10:47PM
SteveX
@ultrajam
06/29/15 08:50:50AM
2,589 posts

textarea ul list on multiple lines fails allowed_html validation


Using Jamroom

I have a textarea field using "allowed_html" for validation.

When I save it with a unordered list written over several lines it fails the validation, but if the list is written all on one line it passes.

This unexpectedly fails:
CANT POST THIS CODE HERE - FAILS VALIDATION FOR THE FORUM
(Its just a ul with each li on a separate line)

This passes as expected:
<ul><li>111</li><li>222</li><li>222</li><li>444</li></ul>

updated by @ultrajam: 07/30/15 08:04:56PM
SteveX
@ultrajam
06/26/15 08:42:16AM
2,589 posts

iframe domains validation


Using Jamroom

I can't enter uwe.ac.uk as a domain in the iframe module. I get the following validation error:
Quote: You have entered an invalid value for "domain name" - value must be a valid domain name (no www)
Thanks!
updated by @ultrajam: 07/29/15 10:30:42PM
SteveX
@ultrajam
06/26/15 04:20:39AM
2,589 posts

404 from lightbox.min.map


Using Jamroom

Getting errors like this in the activity log:
Quote: 404 Page not found: /data/cache/jrElastic/lightbox.min.map

At the bottom of this file /modules/jrCore/js/lightbox-2.7.1.min.js there is this line:
//# sourceMappingURL=lightbox.min.map
It can safely be deleted and the 404 errors will end.

I've had similar errors from bootstrap css which have been fixed by providing a full sourceMappingURL to the skin css dir to prevent it looking in /data/cache/

What the source map does is to allow better debugging and editing in firefox and chrome developer tools, but as far as I can see the map file isn't present in the core anyway.




updated by @ultrajam: 07/29/15 11:12:42AM
SteveX
@ultrajam
06/26/15 03:01:04AM
2,589 posts

Embed Local Media error


Using Jamroom

Looking at this again, I think it's just me looking at it in the wrong way because the Editor Embedded Media module is enabled for a new quota by default.

I can either disable the Editor Embedded Media module for that quota, or enable the Editor Image Upload module. Then there is no error.
SteveX
@ultrajam
06/26/15 02:50:08AM
2,589 posts

Embed Local Media error


Using Jamroom

Reloaded the module but still the same error.

There are two ajax urls:
/embed/tabs/default=undefined/__ajax=1
/embed/load_module/m=/p=1/ss=/ajax=1
  93