Thanks Ron, problem solved. Good to know it's reported as a bug.

Jakob.



On Fri, Aug 13, 2010 at 18:09, Ron Hitchens <[email protected]> wrote:
>
>   I recently reported this as a bug.  It's possible
> to create multiple triggers with the same name within
> a single transaction, because each is created with a
> unique URI.
>
>   The only way currently to remove duplicate triggers
> is to directly remove the trigger definition documents
> from the triggers database.  Run this query in the
> database that contains your triggers:
>
> xquery version "1.0-ml";
> import module namespace trgr="http://marklogic.com/xdmp/triggers"; at 
> "/MarkLogic/triggers.xqy";
>
> fn:collection ("http://marklogic.com/xdmp/triggers";)[//trgr:trigger-name = 
> "YOUR_TRIGGER_NAME"]/xdmp:node-uri(.)
>
>   This will list the URIs of the trigger documents with the
> given name (if any).  You can then use xdmp:document-delete
> to remove them.
>
>   You will, of course, need to be admin to do all this.
>
> On Aug 13, 2010, at 4:43 PM, Jakob Fix wrote:
>
>> Hi,
>>
>> Somehow I've ended up with two triggers having the same name and
>> content (although different IDs) and am now unable to remove them (see
>> error message below); any idea how to remove them anyway?
>>
>> thanks,
>> Jakob.
>>
>>
>> query evaluated in test-db at test-db:/ as 0.9-ml (cq v4.1-6)
>>
>> [0.9-ml] XDMP-AS: (err:XPTY0004) get-trigger($trigger-name) -- Invalid
>> coercion: 
>> (fn:doc("http://marklogic.com/xdmp/triggers/796244929914091878";)/trgr:trigger,
>> fn:doc("http://marklogic.com/xdmp/triggers/2069174680133843641";)/trgr:trigger)
>> as element(trgr:trigger)
>> Stack trace:
>>
>> in /MarkLogic/triggers.xqy line 536:
>> get-trigger("trgr-move-incoming-document")
>>
>> $trigger-name := "trgr-move-incoming-document"
>>
>> in /MarkLogic/triggers.xqy line 956:
>> trgr:remove-trigger("trgr-move-incoming-document")
>>
>> $trigger-name := "trgr-move-incoming-document"
>>
>> line 9:
>> 7:
>> 8: :)
>> 9: trgr:remove-trigger("trgr-move-incoming-document")
>>
>> xdmp:eval("xquery version &quot;1.0-ml&quot;;&#13;&#10;(: buffer 5
>> :)&#13;&...", (), <options
>> xmlns="xdmp:eval"><database>2044008717468543806</database><modules>204400871746854...</options>)
>>
>>
>> in /cq/eval.xqy line 111:
>> _______________________________________________
>> General mailing list
>> [email protected]
>> http://developer.marklogic.com/mailman/listinfo/general
>
> ---
> Ron Hitchens {mailto:[email protected]}   Ronsoft Technologies
>     +44 7879 358 212 (voice)          http://www.ronsoft.com
>     +1 707 924 3878 (fax)              Bit Twiddling At Its Finest
> "No amount of belief establishes any fact." -Unknown
>
>
>
>
> _______________________________________________
> General mailing list
> [email protected]
> http://developer.marklogic.com/mailman/listinfo/general
>
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to