Allowed HTML tags fail validation on shared profile

SteveX
SteveX
@ultrajam
10 years ago
2,584 posts
Beth can create and update items which have tags such as i and em in on her profile.

But she gets an error when saving html in a textarea on a profile (on a different quota) she has been added to as an additional profile owner.

Both the quotas have identical settings for the allowed html tags, and Beth is able to edit both profiles, but html validation fails.

Html tags will save if I change Beth to a Master admin, but fails when I change her back to a Profile admin or a Standard user.

Has anyone else seen anything like this happening? Or any ideas as to why?

Thanks


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)

updated by @ultrajam: 10/14/15 08:59:55PM
michael
@michael
10 years ago
7,793 posts
user/profile FOUR is linked to user/profile THREE.

FOUR adds some bold and italic text via the tinymce to his profile bio. The formatting comes out.
FOUR adds some bold and italic text to THREE's profile via the tinymce. The formatting comes out.

Seams thats not the issue. Think the issue is the [ i ] tags and in textareas where there is not an editor.

You mean like a forum post for example? Beth can add [ i ] to her forum post, but not to some other linked profiles forum post, correct?
SteveX
SteveX
@ultrajam
10 years ago
2,584 posts
Yes, that's correct, although its on a custom module rather than the forum.

The allowed html tags (and all other quota settings) are the same for Beth's quota and the linked profile's quota.

It seems Beth can add italics to a new item she creates on the linked profile and then update it, but cannot update an item which already exists on the linked profile (created by another user).


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)

updated by @ultrajam: 09/08/15 08:03:07AM
michael
@michael
10 years ago
7,793 posts
check that the custom modules verification is the same as the create. Its totally possible to have html allowed on the create form but not allowed in the update form.

So your looking in:
/modules/(custom module name)/index.php

at the view_(module name)_create() function and view_(module name)_update() function.

Guess is that the _create has something like this:
    $_tmp = array(
        'name'      => 'something_body',
        'label'     => 10,
        'help'      => 11,
        'type'      => 'text',
        'validate'  => 'printable'
    );
    jrCore_form_field_create($_tmp);
while the _update() has a different 'validate'
    $_tmp = array(
        'name'      => 'something_body',
        'label'     => 10,
        'help'      => 11,
        'type'      => 'text',
        'validate'  => 'allowed_html'
    );
    jrCore_form_field_create($_tmp);

--edit--
If that's the case then change the validate to both to match each other.

Another thing to try is for Beth to try to update what she just created. If she is unable to update, then its probably that above, but if she can update my guess becomes "The profile quota settings are kicking in for that profile, or other problem" and we can go from there.
updated by @michael: 09/08/15 10:42:38PM
SteveX
SteveX
@ultrajam
10 years ago
2,584 posts
Hi Michael, its the latter - Beth can create and update new items with italics on the linked profile, but cannot update existing items with italics. She can update those existing items if italics are removed.

Thanks


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
michael
@michael
10 years ago
7,793 posts
Can't reproduce it here, can you help me see it happening? either by letting me play with your site or by a DB dump of your setup that I can install on my dev server.

--edit--
I was using the blog module as my testing ground. The editor was enabled, THREE and FOUR are in different quotas. FOUR is linked to THREE and is a standard user. FOUR could update blog posts that contained italic and bold posts that THREE had created.
updated by @michael: 09/09/15 10:57:29PM
SteveX
SteveX
@ultrajam
10 years ago
2,584 posts
Hi Michael, thanks but that's not possible at the moment.

I'll have to get back to this in a few days time, meantime I can make all authors admins on a temporary basis.


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)

Tags