Drupal - FCKeditor: Allow quick uploads

user warning: Duplicate entry '29979473' for key 'PRIMARY' query: INSERT INTO accesslog (title, path, url, hostname, uid, sid, timer, timestamp) values('wget - руководство GNU Wget ', 'node/391', 'http://muff.kiev.ua/content/wget-rukovodstvo-gnu-wget', '216.73.216.29', 0, 'hg6v3c90mo4jndg7fcrf3ulev0', 127, 1765080778) in /usr/local/www/muff.kiev.ua/modules/statistics/statistics.module on line 63.
Версия для печатиОтправить другуPDF version

После установки модуля FCKeditor, приступаем к его настройке: Управление => Настройка сайта  => FCKeditor...

При настройке профилей в File browser settings доступна опция быстрой загрузки. По умолчанию эта опция отключена. При активации этой опции появляется сообщение "При установке Drupal возникли проблемы. Смотрите подробности в отчете о состоянии." Следуюя совету смотрим подробности в отчете о состоянии. При просмотре состояния можно обнаружить такую ошибку:

You are using a feature that requires $cookie_domain to be set, but it is not set in your settings.php (either built-in filebrowser or quick uploads are enabled in the Default profile).

 "Лечится" это следующим образом. Любым доступным способом редактируем файл settings.php (путь к нему следующий:  /корень_сайта/sites/default/settings.php. Находим закомментированый параметр $cookie_domain и изменяем значение на необходимое (доменное имя). В моем частном случае:

До редактирования:

/** Пропущено **/

# $cookie_domain = 'example.com';

/** Пропущено **/
 

 После редактирования:

/** Пропущено **/

$cookie_domain = 'muff.kiev.ua';

/** Пропущено **/

 

Далее необходимо добавить параметр "require_once" в файл /корень_сайта/sites/all/modules/fckeditor/fckeditor/editor/filemanager/connectors/php/config.php.

Ищем переменную "$Config['UserFilesAbsolutePath']" и после нее добавляем строку "require_once '../../../../../filemanager.config.php';"

До редактирования:

/** Пропущено **/

// Fill the following value it you prefer to specify the absolute path for the
// user files directory. Useful if you are using a virtual directory, symbolic
// link or alias. Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
// Attention: The above 'UserFilesPath' must point to the same directory.
$Config['UserFilesAbsolutePath'] = '' ;

/** Пропущено **/
 

После редактирования:

/** Пропущено **/

// Fill the following value it you prefer to specify the absolute path for the
// user files directory. Useful if you are using a virtual directory, symbolic
// link or alias. Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
// Attention: The above 'UserFilesPath' must point to the same directory.
$Config['UserFilesAbsolutePath'] = '' ;
require_once '../../../../../filemanager.config.php';

/** Пропущено **/
 

После этих действий FCKeditor "успокоится" и перестанет ругаться на включение "Allow quick uploads".

Ваша оценка: Нет Средняя: 3 (2 голоса)

Вставай, Україно!

Литература

- "Hе" с глагoлами пишется вместе или oтдельнo? - Через прoбел!