evernote-cloud-sdk-php icon indicating copy to clipboard operation
evernote-cloud-sdk-php copied to clipboard

Create HTML note error

Open david-landry opened this issue 11 years ago • 6 comments

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!

david-landry avatar Dec 07 '14 22:12 david-landry

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.

Laurent-Sarrazin avatar Feb 25 '15 16:02 Laurent-Sarrazin

Hi Laurent,

I finally used the ENML and everything is working.

Thanks, David Landry

Le 2015-02-25 ? 11:14, Laurent Sarrazin <[email protected]mailto:[email protected]> 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/evernote/evernote-cloud-sdk-php/issues/5#issuecomment-75989539.

david-landry avatar Feb 25 '15 20:02 david-landry

@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 avatar Mar 07 '15 07:03 mfkenson

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 avatar Mar 07 '15 07:03 mfkenson

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

mfkenson avatar Mar 07 '15 07:03 mfkenson

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

tetreum avatar Jun 04 '16 15:06 tetreum