diff --git a/lib/common/actions/index.js b/lib/common/actions/index.js index b63d3bf14..d155597d2 100644 --- a/lib/common/actions/index.js +++ b/lib/common/actions/index.js @@ -142,8 +142,8 @@ function getErrorMessageFromJson ( if (patternsMatch) { const patterns = patternsMatch.split(',').map(pattern => { pattern = pattern.slice(1, -1) // Remove curly braces - const [patternId, routeId] = pattern.split('-') - return {patternId, routeId} + const [patternId, internalRouteId, routeShortName, routeId] = pattern.split('-') + return {patternId, internalRouteId, routeShortName, routeId} }) detail = } @@ -179,11 +179,12 @@ const PatternLinkErrorMessage = (props) => { padding: '5px 10px' }}> {patterns.map((pattern, index) => { - const patternPath = `../edit/route/${pattern.routeId}/trippattern/${pattern.patternId}` + // The URL path requires the internal ID for the route record rather than the actual GTFS Route ID. + const patternPath = `../edit/route/${pattern.internalRouteId}/trippattern/${pattern.patternId}` return (
  • - {`Route ${pattern.routeId}, Pattern ${pattern.patternId}`} + {`Route ${pattern.routeShortName || pattern.routeId}, Pattern ${pattern.patternId}`}
  • )