Project

General

Profile

Bug #1371

SQL error when creating session with existing name

Added by Jan Derriks over 9 years ago. Updated over 9 years ago.

Status:
Feature implemented
Priority:
Normal
Category:
-
Target version:
Start date:
27/05/2010
Due date:
% Done:

0%

Estimated time:
Complexity:
Normal
SCRUM pts - complexity:
?

Description

The user doesn't normally see the sql error but in test server mode you will get some ugly errors if you try to add a session with a name that already exists. This should be checked, not handled by exception. And the error "session name soon exists" is funny but fawlty. Soon should be "already".

DATABASE ERROR #1064:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'name soon exists' at line 1
QUERY :
SELECT session_id FROM `dlo_main`.`access_url_rel_session` WHERE access_url_id = 1 AND session_id = Session name soon exists
FILE :
C:\xampp\htdocs\dlo-ivi\main\inc\lib\urlmanager.lib.php
LINE :
292
CLASS :
UrlManager
METHOD :
relation_url_session_exist

DATABASE ERROR #1064:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'name soon exists, access_url_id = 1' at line 2
QUERY :
INSERT INTO `dlo_main`.`access_url_rel_session`
SET session_id = Session name soon exists, access_url_id = 1
FILE :
C:\xampp\htdocs\dlo-ivi\main\inc\lib\urlmanager.lib.php
LINE :
434
CLASS :
UrlManager
METHOD :
add_session_to_url

( ! ) Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\dlo-ivi\main\inc\lib\database.lib.php:989) in C:\xampp\htdocs\dlo-ivi\main\inc\header.inc.php on line 16
Call Stack
  1. Time Memory Function Location
    1 0.0020 558280 {main}( ) ..\session_add.php:0
    2 0.1747 9763576 Display::display_header( ) ..\session_add.php:150
    3 0.1752 9817352 require( 'C:\xampp\htdocs\dlo-ivi\main\inc\header.inc.php' ) ..\display.lib.php:530
    4 0.1752 9817464 header ( ) ..\header.inc.php:16
  • Goto menu * Goto content

My campus - My & organisation
Administration > Training sessions list > Add a training session

Session name soon exists

History

#1

Updated by Julio Montoya over 9 years ago

  • Status changed from New to Needs more info
  • Assignee set to Curt Ricardo Rodriguez Salazar
  • Target version set to 1.8.7

Confirm those bugs:

$SessionNameAlreadyExists = "Session name soon exists"; changed to
$SessionNameAlreadyExists = "Session name already exists";
in translation.chamilo.org

sql problems fixed with http://code.google.com/p/chamilo/source/detail?r=eb255773db573b60f23b2379248eb723e5f7e5aa&repo=classic

#2

Updated by Yannick Warnier over 9 years ago

  • Status changed from Needs more info to Feature implemented

Also available in: Atom PDF