[xwiki-users] hibernate error on page save: XWiki links parser for syntax 1.0 got tougher with broken links
Hello XWiki experts, I've been getting into a crazy situation where I could not save a page anymore. The error reported was a hibernate error complaining about consistency violation wrt to a primary key on xwikilinks. Having looked into the DB, the indexes, tried to remove things, .... I just realized that the error was the parser. That page (a groovy page) was recorded in Syntax 1.0 and the parser caught a piece of string [A-Z], within a regexp, as a link. That'd be a broken link, but it turned out to create this constraint violation. For this case I just upgraded the syntax. Good to know in the future for us, and probably others since "quickly patching a syntax 1.0 page" is likely to be something several people still do although it's all deprecated. Paul
On 07/12/2012 04:37 AM, Paul Libbrecht wrote:
Hello XWiki experts,
I've been getting into a crazy situation where I could not save a page anymore. The error reported was a hibernate error complaining about consistency violation wrt to a primary key on xwikilinks. Having looked into the DB, the indexes, tried to remove things, .... I just realized that the error was the parser.
That page (a groovy page) was recorded in Syntax 1.0 and the parser caught a piece of string [A-Z], within a regexp, as a link. That'd be a broken link, but it turned out to create this constraint violation. For this case I just upgraded the syntax.
Good to know in the future for us, and probably others since "quickly patching a syntax 1.0 page" is likely to be something several people still do although it's all deprecated.
Paul
Yep, link detection in xwiki/1.0 pages is very fragile. Now, the error I think might occur when the database is case insensitive and there are "links" to documents with the same case-insensitive name, but with differences in letter-casing. Does that sound like your situation? I remember fixing a few of bugs related to this, but maybe not all. -- Sergiu Dumitriu http://purl.org/net/sergiu/
Le 12 juil. 2012 à 18:43, Sergiu Dumitriu a écrit :
Now, the error I think might occur when the database is case insensitive and there are "links" to documents with the same case-insensitive name, but with differences in letter-casing. Does that sound like your situation?
I remember fixing a few of bugs related to this, but maybe not all.
Very familiar, the [A-Z] bit was followed by [a-z]. I think the only useful thing to do is to have a slightly more explicit error handling... or just know about it. Paul
participants (2)
-
Paul Libbrecht -
Sergiu Dumitriu