PROBLEM: editing keyword attribute!!!

Author Message

Valentina Ferrari

Wednesday 10 November 2004 2:43:33 am

Hi all!
I have this problem:

I create a new object that contains a keyword attribute.
I fill this attribute with a text that contains an apostrophe (for example: It's fine).
I publish this object and all it's right.

BUT, when I edit this object, the keyword attribute value is repeated n times separeted by a comma (for example: It's fine, It's fine, It's fine)

Anybody knows the solution about this problem????

TIA
Valentina

Wenyue Yu

Wednesday 10 November 2004 5:07:20 am

Hi,

This is caused by not changing ' to \' when select existing keyword. We will fix it in next release. You can fix it yourself by editing file kernel/classes/datatypes/ezkeyword/ezkeyword.php around line 161:

Change

$existingWords =& $db->arrayQuery( "SELECT * FROM ezkeyword WHERE keyword IN ( '$wordsString' ) AND class_id='$classID' " );

to

$wordsString = $db->escapeString( $wordsString );
$existingWords =& $db->arrayQuery( "SELECT * FROM ezkeyword WHERE keyword IN ( '$wordsString' ) AND class_id='$classID' " );

Regards,
wenyue

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 19 2025 01:16:04
Script start
Timing: Jan 19 2025 01:16:04
Module start 'layout'
Timing: Jan 19 2025 01:16:04
Module start 'content'
Timing: Jan 19 2025 01:16:05
Module end 'content'
Timing: Jan 19 2025 01:16:05
Script end

Main resources:

Total runtime1.0057 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0046 590.7500152.6250
Module start 'layout' 0.00460.0033 743.375039.4609
Module start 'content' 0.00790.9963 782.8359463.4766
Module end 'content' 1.00420.0015 1,246.31258.1563
Script end 1.0057  1,254.4688 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.3323160.0002
Check MTime0.00130.1260160.0001
Mysql Total
Database connection0.00060.055210.0006
Mysqli_queries0.961995.6445540.0178
Looping result0.00060.0571520.0000
Template Total0.976097.020.4880
Template load0.00180.181720.0009
Template processing0.974196.860720.4871
Template load and register function0.00010.014710.0001
states
state_id_array0.00070.065610.0007
state_identifier_array0.00090.085420.0004
Override
Cache load0.00140.1437210.0001
Sytem overhead
Fetch class attribute can translate value0.00080.075020.0004
Fetch class attribute name0.00140.138120.0007
XML
Image XML parsing0.00020.024020.0001
class_abstraction
Instantiating content class attribute0.00000.000620.0000
General
dbfile0.00080.0831100.0001
String conversion0.00000.000940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 16
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs