Forum Discussion

ArchiveUser's avatar
ArchiveUser
Qrew Captain
5 years ago

Could not parse XML input

Hi there, 


When I was trying to copy a project this morning. A strange error happened. 

There is an error message that flashes so quickly I can't read it. In the end, it leads me to a page saying "Project Not Found". But the project itself can be edit normally.

 

Finally, I got the message via slow motion video. Here is the message.

 

"Could not parse XML input.

XML Parsing Error. not well-formed (invalid token) at line 1 column 307 (which is byte 307). "


The weird thing is that it only happens to one specific project. 

Is there anyone see this problem or error message before? Thank you very much. 


Ning 

9 Replies

  • AustinK's avatar
    AustinK
    Qrew Commander
    Is this copying an entire app? Or copying something within the app like a table or records on a table?

    Are you using some type of webhooks within the app the could have an error?
  • Thank you.

    I am trying to copy a record. 

    I don't know how to answer webhooks questions. I am using a add-on program developed by others. The program works well till this error only happens to one specific record. 


    • AustinK's avatar
      AustinK
      Qrew Commander
      What add-on are you using?

      It sounds like there is an error with the addon. This could be caused by either the add-on or possibly your schema or fields if they have changed at all. It really depends on the add-on and what it is trying to do. If you can say which add-on it is I can try and help you out.
    • ArchiveUser's avatar
      ArchiveUser
      Qrew Captain
      Thank you very much. Austin. 

      It's a Config.js program, embedded in Home page setting / "Page". 

      It's look like this:  

      var APPTOKEN = "dwnt9wipc3cvfcg6nvd****ps4";
      var userIDs = new Object();

      var tblProject = "bjtm***m9";
      var tblProjectFields = new Object();
      tblProjectFields['PrimaryKey'] = 3; 
      //CLIST BUILDER
      tmpFields = new Array();
      for (el in tblProjectFields) 
      tmpFields.push(tblProjectFields[el])
      var tblProjectCLIST = tmpFields.join(".");
      delete tmpFields;
    • AustinK's avatar
      AustinK
      Qrew Commander
      So it creates a csv of the entire table or possibly a record and then it tries to import it somewhere else.

      Without seeing all of the code and the exact record you are having issues with it is hard to say. If it is erroring on just the one record then my guess would be there is a character in there that it was not ready to handle. Do you have any abnormal text characters in any of these records?

      The way I would go about it is adding a console.log to the right place in that code and seeing the exact xml it is trying to import. That way you can get a look at what it is trying to import, it might help to debug it. You might also be able to see the XML inside of the Chrome developer console but I forget exactly how, possibly in the network tab. That would be the easier way.

      If you are not comfortable with JavaScript you might need to contact the people who you got the script from. It is hard to debug without seeing all the code or the exact record it is failing on but if you do the stuff above it should give you a better idea I think.
  • Hi Austin, 

    Thank you very much for analyzing the problem. Thanks!

    I am not comfortable with JS. I've asked a friend to help me, in your way. We don't have enough time to dig deep. But we are close. 

    It seems that the code can't read the model record ID#, or can't create a new ID#. ..............Something is wrong here.

    We will keep looking it over the weekend and hope to solve it. 





    • NingLi's avatar
      NingLi
      Qrew Trainee
      Hi Austin, 

      It took me a while to used to this new community page. 

      Just want to update you that I have solved this problem.  It's nothing related with the coding. In the end, I found there is a hidden field with a special character "&" which is not allowed in XML. Thanks again for your suggestion. It really helps!

      My following question is I don't understand why this filed is a XML field?  If next time, I need to add a new field, from where and how I can avoid using a XML field. 


      Thank, 
      Ning 
       


      ------------------------------
      Ning Li
      ------------------------------
      • AustinK's avatar
        AustinK
        Qrew Commander
        The new community is very strange. I don't like some of the changes like not being able to expand posted pictures any longer. 

        That makes sense, XML does not like that character. If you have the ability to process the data at all before sending you could use regex to replace & with & which is the way XML expects it. It doesn't always work but it should work.

        A hidden field? Is it just hidden on the form from most users or is this a built in field that you did not create?

        The field itself is not XML. It is just that QuickBase uses XML pretty heavily for the API so somewhere in that code there might actually be an issue. Without seeing the code I can't say where the issue is exactly. Somewhere in there a conversion is happening, either from or to xml and an error should be thrown. It could be in the way it is importing it or it could be in how it is reading the fields from QuickBase. I wish I could be more help in finding the exact bug.