Opened 11 years ago

Closed 11 years ago

#123 closed bug (invalid)

Blog and other Apps of TB produce XML-parsingerror-pages

Reported by: micha Owned by: micha
Priority: critical Milestone: 0.5.2
Component: FrameWork Keywords: Platform PT XML parsing error blog trips
Cc: Micha, philipp, JeanYves

Description (last modified by micha)

When I try to read a blog of a user (, I get the following error message by my browser:

XML Parsing Error: junk after document element
Location: http://localhost/bw/htdocs/blog
Line Number 2, Column 1:<div class="blogitem">

When i look at the source code. I can read this:

<code><h2>Most recent posts</h2>
<div class="blogitem">
    <h3><a href="blog/lupo-test/2">Another blog entry</a></h3>
    <div class="author">
        by <a href="user/lupo-test">lupo-test</a> 
        <a href="blog/lupo-test" title="Read blog by lupo-test"><img src="images/icons/blog.gif" alt="" /></a>
        <a href="trip/show/lupo-test" title="Show trips by lupo-test"><img src="images/icons/world.gif" alt="" /></a>
        - 2007/08/17 15:41    </div>

    <div class="text">
Somehow the XML of TB breaks from time to time.<br/>    </div>
    <p class="action">
<a href="blog/lupo-test/2#comments"><img src="images/icons/comment_add.png" alt="submit a comment"/> submit a comment</a> | <a href="blog/edit/2">edit</a> | <a href="blog/del/2">delete</a>    </p>

<script src=";v=2&amp;key=<?xml version="1.0" encoding="utf-8"?>
  <message>Google config error!</message>

    <event stackno="0">
    <event stackno="1">

    <event stackno="2">

      <class type="-&gt;">BlogView</class>

    <event stackno="3">
      <class type="-&gt;">BlogController</class>


Similar errors occur e.g. with certain pages of the "trips"-application of TB.

Change History (11)

comment:1 Changed 11 years ago by micha

  • Description modified (diff)

comment:2 Changed 11 years ago by micha

  • follow_up set to none
  • Milestone changed from unassigned to 0.1.2 - more improvements & bugfixing
  • Owner set to micha
  • Status changed from new to assigned

It's highly probable that this error is caused by a wrong SQL-query-injection. The inserted apostrophes lead to a wrong database-entry.

comment:3 Changed 11 years ago by micha

  • Cc philipp JeanYves added
  • follow_up changed from none to review code
  • freq_reported set to 1
  • show_on_bw set to 0

This works all now. At least on my test install I had no errors except for the blog/trip location setting. THe error there refers to a non-indexed "Admincode". I found out that when I deleted a constraint for admincode in the table "geonames_cache" in the database, the error was gone. I propose to remove this constraint temporarily on test and reintroduce the blogs/trips again. After having a decent geo-implementation a similar constraint should be created again but for now we should get rid of it.

Who opposes, agrees? (Please, have a short look at the database and the tables geonames_cache and geonames_admincodes)

comment:4 Changed 11 years ago by micha

  • follow_up changed from review code to test

Ok, I deleted the constraint. Everything should be fine now. Please test blog, trip applications for XML-errors! All on

comment:5 Changed 11 years ago by philipp

  • follow_up changed from test to move to alpha

the parsing errors seem to be fixed, can go to alpha together with the blog / trip stuff once ready

comment:6 Changed 11 years ago by lemon-head

We should improve the display of error messages. XML is a bad idea, if it is preceded by normal html. The place to do this is "htdocs/index.php", I think, in the "catch" statement ending the "try" block.

comment:7 Changed 11 years ago by micha

  • Milestone changed from 0.1.4 - improving userinterface for members and volunteers and start work on big 0.2 tasks to 0.2 - community

comment:8 Changed 11 years ago by philipp

  • Milestone changed from 0.2 - community to 0.5.2-short cleanup and framework

ok - lets move this together with the blog / trip in 0.5.2 (pretty soon ;) )

comment:9 Changed 11 years ago by philipp

what's the status? any programming needed or just merging?

comment:10 Changed 11 years ago by micha

hard to say. I would propose to close this ticket and open more specific ones. At least I don't see that there is a general XML-parsing error with TB-Apps. It's specific functions that don't work maybe...

comment:11 Changed 11 years ago by philipp

  • follow_up changed from move to alpha to none
  • Resolution set to invalid
  • Status changed from assigned to closed

ok - assuming that no changesets are related to this ticket I will close it. I think many of the former xml error messages are already taken care of - fire a new ticket for the ones you still encounter.

Note: See TracTickets for help on using tickets.