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

Create HTML note error #5

Open
david-landry opened this issue Dec 7, 2014 · 6 comments
Open

Create HTML note error #5

david-landry opened this issue Dec 7, 2014 · 6 comments

Comments

@david-landry
Copy link

Hi,

I've been trying your code and the OAuth process work like a charm. However, I've tried to create a note and I receive the following error when using
$note->content = new \Evernote\Model\HtmlNoteContent($noteBody);
instead of
$note->content = new \Evernote\Model\PlainTextNoteContent('Some plain text content.');

Error:
Fatal error: Class 'HTMLPurifier' not found in /homepath/src/Evernote/Enml/HtmlCleaner/HtmlPurifier.php on line 13

Is something missing in the code? Will the ENMLNoteContent work?

Regards!

@Laurent-Sarrazin
Copy link
Contributor

Hi,
thanks for the feedback and sorry for the delay.
The HtmlNoteContent is "experimental" so far...
I'd recommend that you stick with the ENML or plain text for now.

Thank you.

PS : I keep the issue open as a reminder.

@david-landry
Copy link
Author

Hi Laurent,

I finally used the ENML and everything is working.

Thanks,
David Landry

Le 2015-02-25 ? 11:14, Laurent Sarrazin <notifications@github.commailto:notifications@github.com> a ?crit :

Hi,
thanks for the feedback and sorry for the delay.
The HtmlNoteContent is "experimental" so far...
I'd recommend that you stick with the ENML or plain text for now.

Thank you.

PS : I keep the issue open as a reminder.

Reply to this email directly or view it on GitHubhttps://github.com//issues/5#issuecomment-75989539.

@mfkenson
Copy link

mfkenson commented Mar 7, 2015

@david-landry After doing the composer install, the error you mentioned would be gone.

kenson@www:/var/www/public_html/evernote/evernote-cloud-sdk-php$ composer install
Loading composer repositories with package information
Installing dependencies (including require-dev)

  • Installing ezyang/htmlpurifier (v4.6.0)
    Downloading: 100%
  • Installing symfony/css-selector (v2.6.4)
    Downloading: 100%
  • Installing tijsverkoyen/css-to-inline-styles (1.5.2)
    Downloading: 100%

Writing lock file
Generating autoload files

@mfkenson
Copy link

mfkenson commented Mar 7, 2015

If you got the following error, please install the php extension "sudo apt-get install php5-xsl"

PHP Warning: DOMDocument::load(): I/O warning : failed to load external entity "/var/www/public_html/evernote/evernote-cloud-sdk-php/sample/client/html2enml.xslt" in /var/www/public_html/evernote/evernote-cloud-sdk-php/src/Evernote/Enml/Converter/HtmlToEnmlConverter.php on line 92
PHP Fatal error: Class 'XSLTProcessor' not found in /var/www/public_html/evernote/evernote-cloud-sdk-php/src/Evernote/Enml/Converter/HtmlToEnmlConverter.php on line 94

@mfkenson
Copy link

mfkenson commented Mar 7, 2015

However, I got the error unsolved.

$content = new Evernote\Model\HtmlNoteContent('');
$content->setBaseUrl('http://www.google.com');
$note->setContent($content);

kenson@www:/var/www/public_html/evernote/evernote-cloud-sdk-php/src/Evernote/Enml/Converter$ php ../../../../sample/client/create_note.php
PHP Fatal error: Uncaught exception 'EDAM\Error\EDAMUserException' in /var/www/public_html/evernote/evernote-cloud-sdk-php/src/EDAM/NoteStore/NoteStore.php:13807
Stack trace:
0 /var/www/public_html/evernote/evernote-cloud-sdk-php/src/EDAM/NoteStore/NoteStore.php(2393): EDAM\NoteStore\NoteStore_createNote_result->read(Object(Thrift\Protocol\TBinaryProtocol))
1 /var/www/public_html/evernote/evernote-cloud-sdk-php/src/EDAM/NoteStore/NoteStore.php(2353): EDAM\NoteStore\NoteStoreClient->recv_createNote()
2 [internal function]: EDAM\NoteStore\NoteStoreClient->createNote('S=s67:U=5efd9f1...', Object(EDAM\Types\Note))
3 /var/www/public_html/evernote/evernote-cloud-sdk-php/src/Evernote/Store/Store.php(25): ReflectionMethod->invokeArgs(Object(EDAM\NoteStore\NoteStoreClient), Array)
4 /var/www/public_html/evernote/evernote-cloud-sdk-php/src/Evernote/Client.php(449): Evernote\Store\Store->__call('createNote', Array)
5 /var/www/public_html/ever in /var/www/public_html/evernote/evernote-cloud-sdk-php/src/EDAM/NoteStore/NoteStore.php on line 13807

@tetreum
Copy link

tetreum commented Jun 4, 2016

It's 2016 and i'm getting the same exception. Looks like Evernote is dead.

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

4 participants