Project

General

Profile

Bug #4837

SQL error if you add an image on the partal homepage with the basic HTML editor

Added by Hubert Borderiou over 7 years ago. Updated over 7 years ago.

Status:
Bug resolved
Priority:
Normal
Category:
-
Target version:
Start date:
01/06/2012
Due date:
% Done:

80%

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

Description

Hi,
I use the basic HTML editor and I want to add an image on the portal homepage.
I've got a SQL error

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 'AND path LIKE BINARY 'milo/www/chamilo.classic/home/default_platform_document/te' at line 1
QUERY :
SELECT id FROM `chamilo19`.`c_document` WHERE c_id = AND path LIKE BINARY 'milo/www/chamilo.classic/home/default_platform_document/template_thumb' LIMIT 1
FILE :
/home/chamilo/www/chamilo.classic/main/inc/lib/document.lib.php
LINE :
1010
CLASS :
DocumentManager
METHOD :
get_document_id

Pb in file main/inc/lib/fckeditor/editor/plugins/ImageManager/Classes/ImageManager.php
function _dirs

Associated revisions

Revision ea57ff8b (diff)
Added by Julio Montoya over 7 years ago

Fixing sql error see #4837

History

#1

Updated by Yannick Warnier over 7 years ago

  • Target version set to 1.9 Beta
#2

Updated by Yannick Warnier over 7 years ago

Clearly the problem comes from th fact that the c_id is not passed...

#3

Updated by Hubert Borderiou over 7 years ago

but there is no c_id because we are in the homepage :s
I'll check it...

#4

Updated by Yannick Warnier over 7 years ago

Images that are global should not be stored in the documents table (or maybe with a c_id = 0? but I don't like that).
The images themselves should be stored in the directory wherever the already-available images (globally) are taken from. I think it's default_course_documents/images/ ...

#5

Updated by Julio Montoya over 7 years ago

  • Status changed from New to Needs more info
  • % Done changed from 0 to 80

I found the error it should be fixed

code.google.com/p/chamilo/source/detail?r=2e6d12f34c69eae1a57806b37057434410560d6c&repo=classic

#6

Updated by Hubert Borderiou over 7 years ago

  • Status changed from Needs more info to Bug resolved

checked and approuved

Also available in: Atom PDF