Opened 10 years ago

Closed 9 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 (http://test.bewelcome.org/blog), 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>

</div>
<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=<?xml version="1.0" encoding="utf-8"?>
<exception>
  <code>0</code>
  <message>Google config error!</message>
  <file>/var/www/test_html/templates/apps/blog/blogitem.php</file>
  <line>112</line>
  <trace>

    <event stackno="0">
      <file>/var/www/test_html/templates/apps/blog/allblogs.php</file>
      <line>22</line>
      <function>require</function>
    </event>
    <event stackno="1">
      <file>/var/www/test_html/build/blog/blog.view.php</file>

      <line>128</line>
      <function>require</function>
      <args>
        <arg>/var/www/test_html/templates/apps/blog/allblogs.php</arg>
      </args>
    </event>
    <event stackno="2">

      <file>/var/www/test_html/build/blog/blog.ctrl.php</file>
      <line>173</line>
      <class type="-&gt;">BlogView</class>
      <function>allBlogs</function>
      <args>
        <arg>1</arg>

      </args>
    </event>
    <event stackno="3">
      <file>/var/www/test_html/htdocs/index.php</file>
      <line>113</line>
      <class type="-&gt;">BlogController</class>
      <function>index</function>

      <args/>
    </event>
  </trace>
</exception></code>

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

Change History (11)

comment:1 Changed 10 years ago by micha

  • Description modified (diff)

comment:2 Changed 9 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 9 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 9 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 test.bewelcome.org

comment:5 Changed 9 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 9 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 9 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 9 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 9 years ago by philipp

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

comment:10 Changed 9 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 9 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.