Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#3910 closed defect (fixed)

Potlatch2 and long value handling

Reported by: SomeoneElse Owned by: potlatch-dev@…
Priority: minor Milestone:
Component: potlatch2 Version:
Keywords: Cc:


If an attempt is made to save a node with a value that's too long, this message is displayed:

An unexpected error occurred, probably due to a bug in Potlatch 2. Do you want to retry? (The server said: NodeTag? 1364231671: v: is too long (maximum is 255 characters) ("<extensions xmlns=\"\" xmlns:xsi=\"\">\n <gpxx:WaypointExtension xmlns:gpxx=\"\">\n <gpxx:DisplayMode>SymbolAndName?</gpxx:DisplayMode>\n </gpxx:WaypointExtension>\n</extensions>"))

There's a yes/no box below - yes seems to mean "try again" and no means "don't". After clicking "no" you do get a "view data" option showing the osmchange xml but that's probably not a lot of use for newbies.

To see the problem try this:

Zoom in and convert the orange dot north of the road to a node and try and save it.

In this case the extra-long value is created by a Garmin GPS. There are other long value trac bugs related to merged Tiger data (3846 open and 3587 closed) but this is a different aspect of the problem.

Edits can be lost due to this problem if you've done a lot of edits prior to a save and don't know where the offending waypoint that's causing the problem actually is.

Among the possible solutions are:

1) Filter "extensions" from the list of tags moved from the waypoint to the node (Potlatch 1 does this) - that would solve the issue I'm seeing with Garmin data but wouldn't affect the problem if someone found another way to cause it.

2) Position the user in the editor to the first offending item and allow them to edit it manually (harder, and might be time consuming if lots of items have the problem).

Change History (3)

comment:1 Changed 9 years ago by stevage

3) Truncate all values at 255 characters on save

4) Skip any objects with values containing more than 255 characters, then warn the user about the problem (so avoiding the "lose unrelated data" problem...)

comment:2 Changed 9 years ago by Richard

Resolution: fixed
Status: newclosed

Manually entered tag values are truncated at 255 characters anyway; this is only an issue with imported values (as in this case, from a GPX). Fixed in .

comment:3 Changed 9 years ago by SomeoneElse

Thanks - tested and working here.

Note: See TracTickets for help on using tickets.