Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error occurred in HTMLPurifier.standalone.php around line 15280 #2094

Closed
jesseray opened this issue Jun 13, 2014 · 6 comments
Closed

Error occurred in HTMLPurifier.standalone.php around line 15280 #2094

jesseray opened this issue Jun 13, 2014 · 6 comments

Comments

@jesseray
Copy link

Yesterday, I installed Symphony 2.4 with the default workspace. I published an article (using the admin area) successfully, and then tried to add a comment to it (using the user-facing website provided by the workspace). When I submitted the comment, I was given this error message:

Symphony User Warning: Base directory /var/www/extensions/markdown/lib/htmlpurifier-4.6.0-standalone/standalone/HTMLPurifier/DefinitionCache/Serializer does not exist, please create or change using %Cache.SerializerPath

An error occurred in /var/www/extensions/markdown/lib/htmlpurifier-4.6.0-standalone/HTMLPurifier.standalone.php around line 15280

15275 if (!is_dir($base)) {
15276 trigger_error(
15277 'Base directory ' . $base . ' does not exist,
15278 please create or change using %Cache.SerializerPath',
15279 E_USER_WARNING
15280 );
15281 return false;
15282 } elseif (!$this->_testPermissions($base, $chmod)) {
15283 return false;
15284 }

Backtrace

[:0]
    GenericErrorHandler::handler();
[/var/www/extensions/markdown/lib/htmlpurifier-4.6.0-standalone/HTMLPurifier.standalone.php:15280]
    trigger_error();
[/var/www/extensions/markdown/lib/htmlpurifier-4.6.0-standalone/HTMLPurifier.standalone.php:15180]
    HTMLPurifier_DefinitionCache_Serializer->_prepareDir();
[/var/www/extensions/markdown/lib/htmlpurifier-4.6.0-standalone/HTMLPurifier.standalone.php:14981]
    HTMLPurifier_DefinitionCache_Serializer->cleanup();
[/var/www/extensions/markdown/lib/htmlpurifier-4.6.0-standalone/HTMLPurifier.standalone.php:15421]
    HTMLPurifier_DefinitionCache_Decorator->cleanup();
[/var/www/extensions/markdown/lib/htmlpurifier-4.6.0-standalone/HTMLPurifier.standalone.php:2220]
    HTMLPurifier_DefinitionCache_Decorator_Cleanup->get();
[/var/www/extensions/markdown/lib/htmlpurifier-4.6.0-standalone/HTMLPurifier.standalone.php:2130]
    HTMLPurifier_Config->getDefinition();
[/var/www/extensions/markdown/lib/htmlpurifier-4.6.0-standalone/HTMLPurifier.standalone.php:5021]
    HTMLPurifier_Config->getHTMLDefinition();
[/var/www/extensions/markdown/lib/htmlpurifier-4.6.0-standalone/HTMLPurifier.standalone.php:178]
    HTMLPurifier_Generator->__construct();
[/var/www/extensions/markdown/text-formatters/formatter.markdown_with_purifier.php:34]
    HTMLPurifier->purify();
[/var/www/symphony/lib/toolkit/fields/field.textarea.php:60]
    formatterMarkdown_With_Purifier->run();
[/var/www/symphony/lib/toolkit/fields/field.textarea.php:167]
    fieldTextarea->__applyFormatting();
[/var/www/symphony/lib/toolkit/class.entry.php:230]
    fieldTextarea->checkPostFieldData();
[/var/www/symphony/lib/toolkit/events/event.section.php:108]
    Entry->checkPostData();
[/var/www/symphony/lib/toolkit/events/event.section.php:442]
    __doit();
[/var/www/workspace/events/event.save_comment.php:87]
    include();
[/var/www/workspace/events/event.save_comment.php:83]
    eventsave_comment->__trigger();
[/var/www/symphony/lib/toolkit/class.frontendpage.php:738]
    eventsave_comment->load();
[/var/www/symphony/lib/toolkit/class.frontendpage.php:441]
    FrontendPage->processEvents();
[/var/www/symphony/lib/toolkit/class.frontendpage.php:188]
    FrontendPage->__buildPage();
[/var/www/symphony/lib/core/class.frontend.php:105]
    FrontendPage->generate();
[/var/www/index.php:31]
    Frontend->display();
Database Query Log
[0.0006] SET character_set_connection = 'utf8', character_set_database = 'utf8', character_set_server = 'utf8';
[0.0005] SET CHARACTER SET 'utf8';
[0.0006] SET time_zone = '-04:00';
[0.0009] SELECT SQL_CACHE t1.name, t2.page, t2.delegate, t2.callback FROM `sym_extensions` as t1 INNER JOIN `sym_extensions_delegates` as t2 ON t1.id = t2.extension_id WHERE t1.status = 'enabled' ORDER BY t2.delegate, t1.name;
[0.0012] SELECT SQL_CACHE `session_data` FROM `sym_sessions` WHERE `session` = 'cf9vbce936qkr1203pf8qv8760' LIMIT 1;
[0.0011] SELECT SQL_CACHE a.* FROM `sym_authors` AS `a` WHERE `username` = 'Jesse' ORDER BY a.id ASC LIMIT 1;
[0.0009] UPDATE sym_authors SET `last_seen` = '2014-06-13 12:36:27' WHERE `id` = 1;
[0.0006] SELECT SQL_CACHE * FROM `sym_pages` WHERE `path` = 'articles' AND `handle` = 'male-gaze-and-female-fertility' LIMIT 1;
[0.0006] SELECT SQL_CACHE * FROM `sym_pages` WHERE `path` IS NULL AND `handle` = 'articles' LIMIT 1;
[0.0006] SELECT SQL_CACHE type FROM `sym_pages_types` AS pt WHERE pt.page_id = 69 GROUP BY pt.type ORDER BY pt.type ASC;
[0.0004] SELECT SQL_CACHE `s`.* FROM `sym_sections` AS `s` WHERE `s`.`id` IN (4);
[0.0009] SELECT SQL_CACHE `id`, `element_name`, `type`, `location` FROM `sym_fields` WHERE `parent_section` = 4 ORDER BY `sortorder` ASC;
[0.0008] SELECT SQL_CACHE t1.* FROM sym_fields AS `t1` WHERE 1 AND t1.`id` IN(10);
[0.0009] SELECT SQL_CACHE * FROM `sym_fields_input` WHERE `field_id` IN (10);
[0.0009] SELECT SQL_CACHE t1.* FROM sym_fields AS `t1` WHERE 1 AND t1.`id` IN(11);
[0.0013] SELECT SQL_CACHE * FROM `sym_fields_input` WHERE `field_id` IN (11);
[0.0013] SELECT SQL_CACHE t1.* FROM sym_fields AS `t1` WHERE 1 AND t1.`id` IN(12);
[0.0013] SELECT SQL_CACHE * FROM `sym_fields_input` WHERE `field_id` IN (12);
[0.0011] SELECT SQL_CACHE t1.* FROM sym_fields AS `t1` WHERE 1 AND t1.`id` IN(13);
[0.0004] SELECT SQL_CACHE * FROM `sym_fields_date` WHERE `field_id` IN (13);
[0.0004] SELECT SQL_CACHE t1.* FROM sym_fields AS `t1` WHERE 1 AND t1.`id` IN(14);
[0.0004] SELECT SQL_CACHE * FROM `sym_fields_selectbox_link` WHERE `field_id` IN (14);
[0.0004] SELECT SQL_CACHE `name` FROM `sym_extensions` WHERE `status` = 'enabled';
[0.0009] SELECT SQL_CACHE t1.* FROM sym_fields AS `t1` WHERE 1 AND t1.`id` IN(15);
[0.0009] SELECT SQL_CACHE * FROM `sym_fields_textarea` WHERE `field_id` IN (15);
@jesseray
Copy link
Author

I just tested adding the comment via the admin interface. Same error.

@brendo
Copy link
Member

brendo commented Jun 13, 2014

Try this, from your terminal, seems to be something new in the Markdown lib.

cd /var/www/extensions/markdown/lib/htmlpurifier-4.6.0-standalone/standalone/HTMLPurifier/
mkdir -p DefinitionCache/Serializer

@jesseray
Copy link
Author

Thanks Brendo. I created the folder and the reported error went away, but then another appeared, which was easily fixed by chmod'ing DefinitionCache/Serializer it to 0777. After that, I was able to submit comments. So, once these changes are made to the Symphony repository, this issue can be closed :)

(And here I was thinking that an actual file was missing =P)

@brendo
Copy link
Member

brendo commented Jun 14, 2014

It'll need to made in the Markdown extension repo, so I'll close this down
regardless and reference it there :)
On 14 Jun 2014 09:49, "Jesse Ray McCracken" notifications@github.com
wrote:

Thanks Brendo. I created the folder and the reported error went away, but
then another appeared, which was easily fixed by chmod'ing
DefinitionCache/Serializer it to 0777. After that, I was able to submit
comments. So, once these changes are made to the Symphony repository, this
issue can be closed :)


Reply to this email directly or view it on GitHub
#2094 (comment)
.

@jensscherbl
Copy link
Member

seems to be something new in the Markdown lib

It's actually the HTML Purifier lib, and it's not new. Maybe there's just a .gitkeep missing for the empty directory in the latest update?

However, wouldn't it make more sense to use manifest/cache for this? Path can be defined in HTML Purifier's configuration.

@brendo
Copy link
Member

brendo commented Jun 14, 2014

That's a much nicer solution. Good find Jens!
On 14 Jun 2014 21:43, "Jens Scherbl" notifications@github.com wrote:

Wouldn't it make more sense to use manifest/cache for this? Path can be
defined in HTML Purifier's configuration.


Reply to this email directly or view it on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants