[ZBX-2012] frontend error - Incorrect usage of quotes Created: 2010 Feb 16  Updated: 2017 May 30  Resolved: 2011 Mar 22

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: None
Affects Version/s: 1.8.1, 1.9.0 (alpha)
Fix Version/s: 1.8.5

Type: Incident report Priority: Major
Reporter: richlv Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: JPEG File items.jpg    

 Description   

similar to ZBX-1939.

item key like :
run[cat something | cut -d\" -f1]

produces errors in the frontend :
Incorrect usage of quotes. [cat something | cut -d\" -f1]



 Comments   
Comment by richlv [ 2010 Feb 17 ]

also will be handled here :
if key contains several macros (for example, key[

{HOST.CONN}

,

{HOSTNAME}

]), and description uses positional references (for example, description $1, $2), only hostname macro is resolved (ordering does not matter)

Comment by Alexander Vladishev [ 2010 Dec 20 ]

Confirmed in branches 1.8 (pre1.8.4), r16245.

Comment by Konstantin Buravcov (Inactive) [ 2011 Jan 31 ]

Seems that those issues are no longer present in 1.8 (with a new trigger expr parser). Checked in rev 17280

richlv, please confirm and I will close the issue then.

Comment by richlv [ 2011 Jan 31 ]

mentioned case indeed seems to be fixed, but here's another one :

a[,`~!@#$%^&*()-_=+[\|;:'",<.>/?]

item with a key like that can be saved and results in an error again :

Incorrect usage of quotes. [,`~!@#$%^&*()-_=+[\|;:'",<.>/?]
(besides, the error message is printed 9 times. is there some redundancy somewhere ?)

Comment by Konstantin Buravcov (Inactive) [ 2011 Jan 31 ]

I've localized the problem:

a['] can be saved
a["] cannot be saved
a["'] cannot be saved
a['"] gives described error.

Comment by Konstantin Buravcov (Inactive) [ 2011 Jan 31 ]

a['"] - is wrong a key format and should not be allowed to save

Comment by Aleksandrs Saveljevs [ 2011 Jan 31 ]

Why? a['"] is a perfectly legal key.

Comment by Konstantin Buravcov (Inactive) [ 2011 Jan 31 ]

My mistake, it is.

Comment by Konstantin Buravcov (Inactive) [ 2011 Feb 02 ]

Error message about incorrect usage of quotes is removed - item description is parsed as expected.

Comment by richlv [ 2011 Feb 02 ]

the error seems to be gone in dev branch - leaving issue as is for code review

Comment by Konstantin Buravcov (Inactive) [ 2011 Feb 04 ]

The problem will be fixed in ZBX-3503. Closing this issue

Comment by Alexander Vladishev [ 2011 Mar 21 ]

Again this problem in the versions 1.8.5rc1 and trunk, r18576.

Comment by richlv [ 2011 Mar 21 ]

although see https://support.zabbix.com/browse/ZBX-2012?focusedCommentId=38718&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_38718 as for why this issue was closed (ZBX-3503 still isn't fixed, unfortunately)

Comment by Marzena Piko [ 2011 Apr 21 ]

Just additional info for "normal" Zabbix users:
After upgrade from 1.8.2 to 1.8.5 same error (Incorrect usage of quotes.) if you previously had a key like this:
system.run["{$OSQL} -d msdb -h-1 -Q \"SET NOCOUNT ON;select count(distinct hostname) from master.dbo.sysprocesses where loginame='ksiup'\""]
After removing leading and ending quotes it's OK, so that's not a big problem, but there was no error before update. (just info)

Generated at Mon Apr 07 05:53:21 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.