[ 
https://issues.apache.org/jira/browse/OFBIZ-10012?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16270528#comment-16270528
 ] 

Jacques Le Roux edited comment on OFBIZ-10012 at 11/29/17 10:04 AM:
--------------------------------------------------------------------

Michael,

You said
bq. It should be detected during testing when a lookup button does not show up 
where it should be and the console.log gives a hint to the developer what is 
missing. We should avoid bringing up developer messages to the user.
Of course the user was not supposed to see this message. The dev was supposed 
to have seen and fixed this issue before (or at very least the QA team if 
exists, though at this point it already shows a bad dev's behaviour). Anyway I 
agree that another method would be better.

I was thinking about console.error() and not showing the lookup. I don't think 
it's enough. Because since I have put the CSP w/o report policy in place the 
console is full of CSP warnings and it's hard to spot even an error. Also 
hidding the lookup is not the best solution because the dev could still miss it 
(again bad dev's behaviour, but who is not making mistakes?).

So I propose to not only shows the error message in browser console but also to 
show the same message, instead of the lookup, using the DOM, instead of simply 
hidding the lookup. I believe a message like
bq. ******* Developer: for lookups to work you must provide a form name! *******
has more chance to be seen in both places ( ******* for more attention)


was (Author: jacques.le.roux):
Michael,

You said
bq. It should be detected during testing when a lookup button does not show up 
where it should be and the console.log gives a hint to the developer what is 
missing. We should avoid bringing up developer messages to the user.
Of course the user was not supposed to see this message. The dev was supposed 
to have seen and fixed this issue before (or at very least the QA team if 
exists, though at this point it already shows a bad dev's behaviour). Anyway I 
agree that another method would be better.

I was thinking about console.error() and not showing the lookup. I don't think 
it's enough. Because since I have put the CSP w/o report policy in place the 
console is full of CSP warnings and it's hard to spot even an error. Also 
hidding the lookup is not the best solution because the dev could still miss it 
(again bad dev's behaviour, but who is not making mistakes?).

So I propose to not only shows the error message in browser console but also to 
show the same message, instead of the lookup, using the DOM, instead of simply 
hidding the lookup. I believe a message like
bq. ******* Developer: for lookups to work you must provide a form name! *******
has more chance to be seen in both place ( ******* for more attention)

> Alert message : "Developer: for lookups to work you must provide a form 
> name!" appears when try to select contentId from Lookup
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-10012
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-10012
>             Project: OFBiz
>          Issue Type: Bug
>          Components: content
>    Affects Versions: Trunk
>            Reporter: Sonal Patwari
>            Assignee: Deepak Dixit
>         Attachments: ContentSearchOptionsAlertShowing (1).png
>
>
> Steps to reproduce:
> 1. Go to [Content 
> Component|https://demo-trunk.ofbiz.apache.org/content/control/main]
> 2. Click on Content from 
> [submenu|https://demo-trunk.ofbiz.apache.org/content/control/findContent].
> 3. Click on the Advanced Search button 
> [https://demo-trunk.ofbiz.apache.org/content/control/ContentSearchOptions].
> 4. Provide Content Id.
> 5. User should be able to see the alert message.
> 6. For reference screenshot is attached.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to