[SOLVED] About field no access message, the message is displayed even if a field does not have a value

More
8 years 11 months ago - 8 years 11 months ago #58888 by lclaude
Hello,

The file field is screened for users with no access instead of there is no file and the 'Show no access message' param is set.

When I put a access level on the file field, for example 'registered' and I set the param 'Show no access message', then for a visitor the field display I must be connected even if there is no file.
But I want the file field to be not displayed at all if I don't have a file in, like if the ACL is set to 'public' for this field.

Is this a bug or a misconfiguration ?

Thanks for your help.

Laurent
Last edit: 8 years 11 months ago by ggppdk.

Please Log in or Create an account to join the conversation.

More
8 years 11 months ago - 8 years 11 months ago #58889 by ggppdk
Hello

- it is a bug
- it effects all fields and not only file field

code for this is one place, should be easy to fix
- this will be next big to fix
Here is a new v3.0.9 issue:
github.com/FLEXIcontent/flexicontent-cck/issues/397

i say easy to fix, you can test a fix now (before i do)

Edit file:
component/com_flexicontent/classes/flexicontent.fields.php

find line and replace:
Code:
$field->$method = $show_acc_msg ? '<span class="fc-noauth fcfield_inaccessible_'.$field->id.'">'.$no_acc_msg.'</span>' : '';

with:
Code:
if (!empty($field->value)) { $field->$method = $show_acc_msg ? '<span class="fc-noauth fcfield_inaccessible_'.$field->id.'">'.$no_acc_msg.'</span>' : ''; } else { $field->$method = ''; }


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...
Last edit: 8 years 11 months ago by ggppdk.
The following user(s) said Thank You: lclaude

Please Log in or Create an account to join the conversation.

More
8 years 11 months ago - 8 years 11 months ago #58893 by lclaude
Hello,

It works fine for me.

As allways many thank you for your accurate and quick response!

Laurent
Last edit: 8 years 11 months ago by ggppdk.

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.663 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline