TheRosettaFoundation / SOLAS-Match

Self-managed translation project interface
www.TheRosettaFoundation.org
GNU Lesser General Public License v3.0
12 stars 8 forks source link

Task Insert Failure does not return error to user #1266

Closed alanbarrett closed 7 years ago

alanbarrett commented 7 years ago

A Task Insert Failure does not return an error to user. This is from: https://trommons.org/project/5859/create-task/

PHP gives: PHP Fatal error: Call to a member function getId() on a non-object in /repo/SOLAS-Match/ui/RouteHandlers/TaskRouteHandler.class.php on line 1565

This will be caused when a duplicate of the following is found: title,project_id,language_id-source,language_id-target,country_id-source,country_id-target,task-type_id

@Paulina-Rosetta @stefania91 , This issue is a follow on from the problem found with project 5859, but is probably not the cause.

Alan.
alanbarrett commented 7 years ago

Commit 2a8127a9e0d6def452e5e79aa666c2ba7ae2a7fb addresses this.

Alan.
alanbarrett commented 7 years ago

Note, this allows someone to create a task with the same language pairs and task type within a project. But this was allowed anyway as long as the user used a different task name... so I decided not to change the way the system worked by prohibiting that.

Alan.