Forum Activity for @ultrajam

SteveX
@ultrajam
08/05/15 03:09:35AM
2,589 posts

jrGoogleAnalytics won't enable in ACP


Using Jamroom

The module seems fine on localhost.

I have enabled the module using the database (I now cannot disable it from the ACP).

Maybe the enable/disable problem is something to do with this:
When I try to save the config tab of the module I get
Quote: You have entered an invalid value for "domain" - value must be a valid domain name (no www)
The domain is uwe.ac.uk
SteveX
@ultrajam
08/04/15 08:22:21AM
2,589 posts

jrGoogleAnalytics won't enable in ACP


Using Jamroom

Trying to enable the jrGoogleAnalytics module, but it will not enable when I set the module to active and save changes.

I can successfully reload the module from the marketplace, but still cannot enable it.

There are no error messages, and nothing in the logs to indicate anything wrong. Other modules I have tried seem to enable and disable just fine.
updated by @ultrajam: 09/06/15 10:53:19PM
SteveX
@ultrajam
08/03/15 10:32:27AM
2,589 posts

jrAdminSkin module views


Using Jamroom

Thanks Michael :)
SteveX
@ultrajam
08/02/15 08:51:58AM
2,589 posts

PHP Fatal error: Cannot set directive after finalization


Jamroom Developers

Thanks Michael, try this:

This will work with Allowed HTML Tags (blockquote,blockquote.class,blockquote.data-content,cite,cite.title,footer)

In util.php jrCore_strip_html around line 1571 add this additional code after the line $def->addAttribute('a', 'data-lightbox', 'Text');:
// ------- additional code -------                    
// comment out unset($_att); on line 1559 in order for this to work
foreach ($_att as $attr) {
    if (!strpos($attr, ',')) { // ignore jamrooms lists of element.attributes defined above
        list($element,$attribute) = explode('.', $attr);
        $def->addAttribute($element, $attribute, 'Text'); // add to HTML Definition
    }
}
unset($_att);
// ------- end additional code -------  

NOTE: Comment out unset($_att); on line 1559 - we need that array in order for this to work.

Obviously that doesnt take into account anything added by the trigger listeners, but it works perfectly with the elements and attributes added to the quota Allowed HTML Tags (as far as I have tested).
updated by @ultrajam: 08/02/15 08:52:17AM
SteveX
@ultrajam
07/31/15 07:20:27AM
2,589 posts

jrTracker update item shows wrong profile's tracker owners in dropdown


Using Jamroom

I have a tracker set up on my profile, I am the only one who posts to it.

I had no problems over the past few months, but now when I update a tracker item I see two other users and unassigned in the Tracker Owner dropdown. I am still the owner of the item though (I can see that in the list view) until I save it.

The dropdown shows the correct owners in the create form (Steve, unassigned) but not in the update form (Tom, Ludo, unassigned).

Tom and Ludo don't have a tracker on their quota.
updated by @ultrajam: 09/09/15 01:48:52PM
SteveX
@ultrajam
07/31/15 02:16:35AM
2,589 posts

links in emails from Jamroom Support missing links now


Using Jamroom

Probably the same problem, but the link to the post is missing in New Reply emails from our jrForum 1.6.0
updated by @ultrajam: 08/05/15 11:38:14AM
SteveX
@ultrajam
07/30/15 06:01:28AM
2,589 posts

jrAdminSkin module views


Using Jamroom

I want to just use Elastic as the admin skin for forms etc, and use another skin for the rest of the site.

So I have installed jrAdminSkin and set Elastic as the active admin skin, and Nova as the active skin and active profile skin.

Module views such as /blog/ and /profile/list_profiles are displayed with the Elastic header and footer. Shouldn't they be using the active skin's header and footer (Nova)?


updated by @ultrajam: 09/08/15 06:25:14AM
SteveX
@ultrajam
07/30/15 04:17:43AM
2,589 posts

PHP Fatal error: Cannot set directive after finalization


Jamroom Developers

Thanks Michael.

Try adding elements and attributes to the whitelist using jrFramer - so set that active and allowed.

Replace jrFramer_html_purifier_listener with this:
function jrFramer_html_purifier_listener($_data,$_user,$_conf,$_args,$event)
{ if (isset($_conf['jrFramer_active']) && $_conf['jrFramer_active'] == 'on') { $_data->set('HTML.SafeIframe', true); $_data->set('URI.SafeIframeRegexp', '%(.*)%'); // ADDITIONAL TESTING CODE $_elem = $_data->get('HTML.AllowedElements'); // Set additional elements $_elem['abbr'] = 1; $_elem['blockquote'] = 1; $_elem['cite'] = 1; $_elem = implode(',', array_keys($_elem)); $_data->set('HTML.AllowedElements', $_elem); $_attr = $_data->get('HTML.AllowedAttributes'); // Set additional attributes $_attr['abbr.title'] = 1; $_attr['cite.title'] = 1; $_attr['blockquote.class'] = 1; // this needs to be present in the function in util.php as well $_attr['blockquote.data-content'] = 1; $_attr = implode(',', array_keys($_attr)); $_data->set('HTML.AllowedAttributes', $_attr); } return $_data; }

You will get the fatal error when visiting a page with an editor field in it.

To fix that error add this at line 1564 of util.php:
$pc->autoFinalize = false;

Then add blockquote and cite to your quota config Allowed HTML Tags if necessary.

Clear caches after each change to attributes or elements.

Then add this to an editor field and save:
<blockquote class="blockquote-reverse" data-content="test-content-12">
  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
  <footer>Someone famous in <cite title="Source Title">Source Title</cite></footer>
</blockquote>

data-content="test-content-12" will be stripped out on save. Which isn't what I expected to happen.

You can test that the listener is adding the attributes in by commenting out $_attr['blockquote.class'] = 1; then clearing caches, then saving the editor field again - the blockquote class will be stripped out. Remove the comment, clear caches, resave the editor field and the class will be saved.

So that is working fine with class, but not with data-content.

To get data-content to save it needs to be added in the listener, and ALSO in the jrCOre_strip_html function in util.php

Find this line:
$def->addAttribute('a', 'data-lightbox', 'Text');
and add this line after it:
$def->addAttribute('blockquote', 'data-content', 'Text');

Empty caches, save the editor field and the data-content attribute will be saved.
Comment out either the line whitelisting data-content in the jrCore_strip_html function OR jrFramer_html_purifier_listener (empty caches etc) and data-content will be stripped out. It needs to be allowed in both places.

This means that (once the fatal error has been fixed) with the current listener you cannot add to the attributes whitelist. Class, title etc can be whitelisted for an element, but not data elements, aria attributes, etc. They need to be allowed in BOTH places ('HTML.AllowedElements' and the HTML Definition), and adding via listener only adds in HTML.AllowedElements.
updated by @ultrajam: 07/30/15 04:21:23AM
SteveX
@ultrajam
07/29/15 09:38:33AM
2,589 posts

PHP Fatal error: Cannot set directive after finalization


Jamroom Developers

It is really strange though, I can set blockquote.class in my listener, but not blockquote.data-content.

To get blockquote.data-content to work I need to add it in my listener, and also in jrCore_strip_html alongside where you have added code to allow for data-lightbox. It doesn't seem to work if it is added in one place or the other, it needs to be in both.
updated by @ultrajam: 07/29/15 09:41:15AM
SteveX
@ultrajam
07/29/15 06:40:05AM
2,589 posts

PHP Fatal error: Cannot set directive after finalization


Jamroom Developers

This doesn't seem to be a problem with my module, but with adding to the whitelist (I tried disabling my modules and adding an attribute to the htmlpurifier whitelist in the jrFramer listener - got the same error).

I think I have a fix:

In order to add or set the whitelist (AllowedElements or AllowedAttributes) autoFinalize needs to be set to false before the html_purifier trigger event runs on line 1564 of /modules/jrCore/lib/util.php.
$pc->autoFinalize = false;
It actually did this until 5.2.37
  92