Skip to main content
Inspiring
October 11, 2022
Answered

XmlSearch function broken on CF 2018 Update 15

  • October 11, 2022
  • 2 replies
  • 1974 views

Hello,

 

After updating from CF 2018 Update 14 to Update 15, on two separate servers, the XMLSearch function appears to be either removed or bugged to the point of non functioning.

 

I got the following error dump when after the update

 

Has anyone else encountered this? I have looked over the bug tracker and haven't seen a report yet, but since the update was just released I wanted to check here first.

 

Here is an example of a line of code that triggered this error:

 

<cfset searcharray = XmlSearch(data, "/Tags/Tag") />
 
Also, along with this problem attempting to uninstall Update 15 from a server that had gone through the ColdFusion lockdown process corrupted the installation where attempting to access the administrator UI resulted in a 500 error. A complete restore of the server in question was required to get functionality back.
    This topic has been closed for replies.
    Correct answer neochad

    Can you please share the repro code to reproduce the issue, also, can you paste the contents of jvm.config


    In attempting generalize the code for replying to to your request I think I found the problem. It looks like class caching might be the problem as I made a minor change to the cfm file, saved and tried again and it worked.

     

    However in other places that I hadn't modified the files the problem still persisted, I shut down the ColdFusion instance, cleared the cfclasses directory and restarted the server and the problem went away.

    2 replies

    BKBK
    Community Expert
    Community Expert
    October 13, 2022

    I tested with the following code on ColdFusion 2018 Update 15 and it worked fine. 🙂

    <cfsavecontent variable="data" ><?xml version="1.0" encoding="ISO-8859-1"?>  
    <Tags>
    	<Tag>blah di blah di blah</Tag>
    </Tags>
    </cfsavecontent>
    
    <cfset searcharray = XmlSearch(data, "/Tags/Tag") />
    
    <cfdump var="#searcharray#" >

     

    Charlie Arehart
    Community Expert
    Community Expert
    October 13, 2022

    I can confirm that I, too, can run that code BKBK offers,a nd it gets no error, even on update 5. To be clear, I do NOT have that JVM arg added. And I also created the file anew after update 5.

     

    So to Adobe or others experiencing problems, is there something about BKBK's code that is not accurately representing the issue, which update 5 should prevent working (unless that JVM arg is added)?

    /Charlie (troubleshooter, carehart. org)
    Charlie Arehart
    Community Expert
    Community Expert
    October 17, 2022

    Can anyone from (Adobe or otherwise) help clarify things here? 

    /Charlie (troubleshooter, carehart. org)
    RaviShankar Chagnur
    Adobe Employee
    Adobe Employee
    October 11, 2022

    Can you please add the below parameter to java.args in jvm.config 
     -Dcoldfusion.xml.allowPathCharacters=true
     Restart Coldfusion and let us know the results
     

    neochadAuthor
    Inspiring
    October 11, 2022

    I had to do a complete system restore from snapshot to get the system back online, I do not have it currently installed. I can attempt on another sandbox system to see if it helps.