Closed (fixed)
Project:
Emogrifier
Version:
7.x-2.0-beta1
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 Feb 2014 at 02:48 UTC
Updated:
15 Sep 2019 at 20:58 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
tennisbear commentedI was having a similar problem. I fixed it by editing my copy of emogrifier.php and commenting out the second line:
// namespace Pelago;Try that and see if it works for you.
Comment #2
jeff.k commentedOMG! Thank you. That did it. I was about to give up. Now on with testing.
Comment #3
jeff.k commentedSadly it does not work for me. I am not sure if it broke because of the commenting out of that line or because of some other issue.
I am trying to send html emails using the bootstrap theme, not sure if there are issues with that.
Anyone have any ideas?
Comment #4
danreb commentedChange title, will add patch later...
Comment #5
danreb commentedHere's the patch for this problem, with this patch you don't need to modify any file in the downloaded emogrifier library.
Comment #6
jeff.k commentedThanks for the patch although I am still not able to get this to work.
When I add this to my text format it just strips out all the classes. Both the sites display and emails sent contain only html tags
Is there any other special configuration I must do to get this to work?
Any help is greatly appreciated.
Comment #7
danreb commentedThe emogrifier.module strips out all classes and id attributes and just leave the html tag with embedded style attributtes with it, it is because of this code near line 163 - 166 in emogrifier.module
So if you want to retain the classes and id's in html tag, just comment out these lines, you may want also to read the other similar problem here -> https://drupal.org/node/1842946 and it also have a patch which removes all the regular expression.
Comment #8
jeff.k commentedSorry I don't think I was clear
The classes are being removed but there are no style attribute additions to reflect the classes being removed.
I will setup a test install with just this enabled and see if I have any luck there.
Ultimately I am trying to send emails that use the contents classes to render the style within the site.
Comment #9
danreb commentedComment #10
sistro commentedI don't now if mine is the same issue.
I don't now where to put the emogrifier.php file, wherver I put it is not seen and i got the message: "The Emogrifier class library was not found."
I've tried this locations and tried to change to lowercase and uppercase letters:
libraries/emogrifier/emogrifier.php
libraries/emogrifier/Emogrifier.php
libraries/Emogrifier/Emogrifier.php
I also tried to downlonad entire master.zip files, unzip and rename folder to emogrifier so the path was:
libraries/emogrifier/Classes/Emogrifier.php
Please help me!
Comment #11
danreb commentedHi,
If you don't know how to apply the patch, read on here -> https://drupal.org/patch/apply
Danreb
Comment #12
sistro commented#11 Worked for me, thanks danreb!
Comment #13
geek-merlinI have reworked this to apply onto #1842946-8: Modify HTML code only by the Emogrifier library (that one is also critical and already rtbc).
Now this has a more verbose message where the library is expected.
Please test and set rtbc so we can get this in!
Comment #14
kissmedve commented#13 works fine. Thanks! Setting to rtbc.
Comment #15
geek-merlinComment #16
bennybobw commentedNeither of the patches worked on a clean copy of HEAD for me. Attaching a patch that matches the one in #13, but on clean head.
Comment #17
andrewj0seph commentedContinue to recieve "The emogrifier class library required by the emogrifier module could not be loaded." message. Have tried all patches including #16 - most have resulted in a WSOD. Emogrifier.php currently exists in /libraries/emogrifier/Classes
Not sure what I am doing wrong. Any help would be very much appreciated.
Comment #18
danreb commentedHi Andrew,
Emogrifier.php should exists in
sites/all/libraries/emogrifier/Classes/Emogrifier.phpDanreb
Comment #19
roball commented@axel.rutz:
Unfortunately, this module is unmaintained. No activity since 2 years, with critical bugs solved in the issue queue. Are you a new maintainer?
Comment #20
roball commentedComment #21
geek-merlini could commit to do the cleanup but i'm too busy to do maintainership alone.
anyone else to help? (if yes you may also pm me to get the ball rolling as i'm not too often in the issue queue...)
Comment #22
somatics commentedIs there a final resolution for this issue? I don't want to patch anything if it's causing a WSOD, and it's not clear to me from the thread if this has been solved and/or committed to the dev release.
I am getting this error, even though the library is present:
Screenshot of the library installed is attached here:
Comment #23
Breakerandi commentedI tried every patch which has been committed here and nothing works.. still the library can't be found. I placed it in /sites/all/libraries/emogrifier/Classes/Emogrifier.php as usual.
Comment #24
DrCord commentedThe patch in #16 worked perfect for me, the status report is now happy about the installation status of the emogrifier library.
Comment #25
rsbecker commentedI needed to make one change in the patch at #16 to make this work.
It worked when I removed the @ before "include once ..."
I am using PHP 5.3.27. Don't know if that is the reason it didn't work as originally written.
Comment #26
DrCord commentedremoving the @ symbol will allow that line to throw an error and not ignore it...not sure why that would fix it...
Comment #27
ndf commented#16 works for me too.
Comment #28
kanghj commentedOk, #16 works for me now too. But the styles are getting removed, and not inlined.
Comment #29
Anonymous (not verified) commented#1 worked for me.
// namespace Pelago;
Comment #30
queenvictoria commentedI've rerolled #13 so it applies cleanly to HEAD. Not the right thing to do but until we get a new maintainer...
Comment #31
alexdezark commentedNothing works for me.
Why don't you give a "ready-to-use" patched file instead of a patch ?
I'm trying to use "commerce invoice recept" for 2 days, same with "commerce email", they all needs emogrifier and emogrifier is not detected by Drupal...
I tried to apply the patch (#30) with Eclipse and the file just disappear... I'm not a Patch'man and I really need something working.
Is there a solution ?
Comment #32
tostaky commented#16 worked.
But do not mix the two proposals:
#16 does not seem to work if you comment // namespace Pelago
Comment #33
alexdezark commentedAm I so stupid ?
I tryed to apply #16 and #30 (separately with new module and new database each time) with the command line :
git apply -v '/path-to-the-patch'My terminal says :
I checked the files, they look ok.
Then I enable emogrifier module, then I checked my clipboard and :
Could you please give me a working patched zipped module ?
thanks in advance
Comment #34
alexdezark commentedOK everything is working now !
it was the rights that are inadequate on the folder 'Classes'...
Thanks a lot.
Comment #35
tarasiadis commented#16 works for me too.
Comment #36
griz commentedThe patch in #16 works for me too. I'd say this needs to be committed but I wonder if this module will ever be updated.
Comment #37
jnicola commentedYou can report this module as needing a new maintainer and take over maintainership yourself to implement these patches. Pretty easy process really.
Comment #38
ndf commentedComment #40
wdseelig commentedAm unable to install 7.x-2.0-beta1.
I am getting error messages for lines 91,96, 101, and 106 in the sites/all/libraries/emogrifier/Classes/Emogrifier.php file.
The errors mostly involve square brackets [] that PHP says are unexpected.
Simply quoting them does not fix the problem.
Wyckham
Comment #41
dasginganinjawdseelig, The error you are experiencing is due to the fact that you have a PHP version before 5.4.0.
Comment #42
svouthi commentedSimply copying Emogrifier.php to a new Classes folder as in comment #18 worked for me.