gushphp / toinlinestyleemailbundle Goto Github PK
View Code? Open in Web Editor NEWA Symfony2 bundle to use the CssToInlineStyles converter by Tijs Verkoyen
License: MIT License
A Symfony2 bundle to use the CssToInlineStyles converter by Tijs Verkoyen
License: MIT License
Hi guys,
Could you please include generateStyledHTML() in the ReadMe file - I know it seems like common sense, but you've documented the rest of how the Bundle works so it would surely make sense to document the actual parsing?
I have a following warning in Sf2.8 which blocks me from upgrading to 3:
Defining the getGlobals() method in the "inlinecss" extension without explicitly implementing Twig_Extension_GlobalsInterface is deprecated since version 1.23.
It seems like composer can't find a "dev-master"
branch for the dep. You should probably use the last stable tag for that package : 1.2.1
. I have minimum-stability
set to stable
in my composer.json
.
This is what composer spits out:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for robertotru/to-inline-style-email-bundle dev-master -> satisfiable by robertotru/to-inline-style-email-bundle[dev-master].
- robertotru/to-inline-style-email-bundle dev-master requires tijsverkoyen/css-to-inline-styles dev-master -> no matching package found.
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.
Read <http://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
I see the 1.3.0 release was tagged 14 hours ago (thanks @Richtermeister), but Packagist hasn't picked it up.
Hi,
I was trying to use {% inlinecss within my code, but it wasn't working.
I am having this line at the top of my Twig template :
{% inlinecss "@TestTestBundle/Resources/views/Clients/client1/layout1.css" %}
While the CSS is correctly loaded, I was getting the "The CSS must be set" error.
Eventually, the ToInlineStyleEmailConverter::inlineCSS function was just setting the HTLM and CSS for $this->cssToInlineStyles, instead of it's own variables.
So, in ToInlineStyleEmailConverter, lines 208 and 209, you just have to remove "->cssToInlineStyles", and everything while work.
I could have sent a PR for this, but I'm at work and I don't have the time to fork, install GitHub, make the changes, commit ๐
Mikael.
https://packagist.org/packages/robertotru/to-inline-style-email-bundle is not showing the latest tag because things are not hooked on settings under github and packagist is not showing @Richtermeister as collaborator also. Could you please grant that @robertotru ? thanks ๐
Your last version are not compatible with tijsverkoyen/css-to-inline-styles v2.2.0.
Breaking changes with some methods presents on ToInlineStyleEmailConverter class.
At the moment it emits the following deprecation
Using the "Twig_Extension_GlobalsInterface" class is deprecated since Twig version 2.7, use "Twig\Extension\GlobalsInterface" instead.
Hi,
When I update tijsverkoyen/CssToInlineStyles
module to 1.5.2 I get this error :
Fatal error: Class 'TijsVerkoyen\CssToInlineStyles\CssToInlineStyles' not found in (...)bundles/RobertoTru/ToInlineStyleEmailBundle/Converter/ToInlineStyleEmailConverter.php on line 95
This update uses a better css specificity.
Can you fix it ? ๐
I've tried current master with
{% inlinecss "@BadgeBundle:css:email.css" %}
And unfortunately it looks for the css in a directory starting with web/@BadgeBundle
There is no freaking way in symfony to prevent the extension to warm up the object constructors and performance-wise this is not acceptable.
The extension always loads, no way around it because it is tokenParser depending on other objects
I disabled the bundle and just reusing the service directly on my mailer service when i need it.
Hi,
Is there a way to use the inlinecss twig tag with a variable, like this:
{% inlinecss styleSheet %}
Thanks
I must confess this is my first time using ToInlineStyleEmailBundle. I am using @dev-master
and have encountered this issue during php app/console assetic:dump
. However, when I remove
[...] implements \Twig_Extension_GlobalsInterface
from InlineCssExtension.php:19, it seems to work fine. I have looked it up but can't find this exact issue with anyone else. I did come across this which might mean the version of SensioDistributionBundle I'm using (~3.0.12
) or the AsseticBundle (~2.3
) might not be recent enough(?) However I can't change any of the deps because I'm afraid everything else will fall apart.
However because I'm inexperienced, it's most probably something that I'm doing wrong. However, I would like to get to the bottom of this so if someone could help me out. So this is more of a quest than an issue. Going right to creating an issue on GitHub isn't an ideal thing to do but I couldn't find another forum for discussion on this issue.
When using the inlinecss twig tag in a template, every href value is apparently url encoded by tijsverkoyen/css-to-inline-styles.
This was mentioned here and is particularly annoying when using special templating tags provided by MailChimp for example.
Example:
{% inlinecss 'path/to/stylesheet.css %}
To unsubscribe, click <a href="*|UNSUB|*">here</a>.
{% endinlinecss %}
will result in the following HTML:
To unsubscribe, click <a href="*%7CUNSUB%7C*">here</a>.
instead of:
To unsubscribe, click <a href="*|UNSUB|*">here</a>.
How can we avoid this behavior?
use tijsverkoyen/css-to-inline-styles latest release to the third number ~1.5.2 as best practice
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.