CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • CiviMail Stylesheet Reference Error
Pages: [1]

Author Topic: CiviMail Stylesheet Reference Error  (Read 2236 times)

emilyf

  • Ask me questions
  • ****
  • Posts: 696
  • Karma: 54
  • CiviCRM version: 2.x - 4.x
  • CMS version: Drupal 5, 6, 7
CiviMail Stylesheet Reference Error
September 03, 2008, 09:00:33 am
I am trying to send a CiviMail HTML mailing with a link to a stylesheet reference. However, it will not come through properly because CiviMail keeps trying to replace my URLs (see http://forum.civicrm.org/index.php?topic=680.0 and http://issues.civicrm.org/jira/browse/CRM-2031 for reference).

When I put the URL in my HTML code as this:
Code: [Select]
<LINK REL=StyleSheet HREF="http://mysite.org/sites/all/themes/zen/cctv/layout.css" TYPE="text/css" MEDIA=screen>

it turns it into this when the final email comes out:
Code: [Select]
<LINK REL=StyleSheet href='http://mysite.org/sites/all/modules/civicrm/extern/url.php?u=188&qid=148' TYPE="text/css" MEDIA=screen>
If I leave it as relative,
Code: [Select]
<LINK REL=StyleSheet HREF="/sites/all/themes/zen/cctv/layout.css" TYPE="text/css" MEDIA=screen>
it looks great in the CiviMail preview, but of course it is broken in the final email.

I believe this problem is strictly with the href tag since my img src urls are working fine:

Code: [Select]
<img src="http://mysite.org/sites/all/themes/zen/cctv/images/header_hatching.png" width="943" height="95" alt="background hatching" />
This is a huge style sheet and I would like to avoid pasting the entire thing into my template if possible. Is there some way I can get around this so as to have an absolute ref to my style sheet come through correctly?

This is all on my CiviCRM 2.0 install running Drupal 5.9.

Thanks.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: CiviMail Stylesheet Reference Error
September 03, 2008, 11:03:40 am

1. when u run this url: http://mysite.org/sites/all/modules/civicrm/extern/url.php?u=188&qid=148 do u get the css file back?

Maybe the link element does not like a 302 redirect. If you can confirm this, please file an issue and we'll need to figure out how not to "url track" css urls in a link tag

Your easiest option for now is to turn off civimail's url tracking feature.

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

emilyf

  • Ask me questions
  • ****
  • Posts: 696
  • Karma: 54
  • CiviCRM version: 2.x - 4.x
  • CMS version: Drupal 5, 6, 7
Re: CiviMail Stylesheet Reference Error
September 03, 2008, 11:45:55 am
Issue filed: http://issues.civicrm.org/jira/browse/CRM-3492

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: CiviMail Stylesheet Reference Error
September 03, 2008, 12:38:23 pm
Hi Lobo - we have just tried to use this set up http://forum.civicrm.org/index.php/topic,3905.0.html so that - if I understood it - we could flip out an email that would, say, include all the {contact.address} type tokens so the person can see the address details we have for them, and then click on a link that would take them to a profile that would show the same fields as recorded on the database, and allow them to update the data.

Now we may have gotten the wrong end of the stick, or just implemented it properly but ...

Firstly, with Track Click Throughs on we end up with the same problem as here, namely that the URL provided for the profile gets preceded with that sort of address so we get
http://(our.web.site.address)/sites/all/modules/civicrm/extern/href=%22http://(our.web.site.address)/civicrm/profile/edit?reset=1&gid=1&cs=82040e6e5e0ed56201080d2e6e66a9da_1220440559_168

Second, if I strip off the first bit in the browser, or turn Track Clicks off, and get the correct URL, then for an Anonymous User, using a browser I am not currenly logged in on, I do not end up with any of the fields showing the existing data.

So, first point is, is this another example of the Track Click Through's 'interfering' with a function that should work (ie this ticket)

Second, are we atttempting the impossible with getting the fields to show the existing data for an Anonymous User, or is this what forum topic 3905 is attempting to achieve. If so perhaps we should continue this second part of the conversation back on that posting ;-)
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: CiviMail Stylesheet Reference Error
September 03, 2008, 01:30:44 pm

lets move back to the original topic. The functionality is supposed to work for anonymous user for a limited time period (1 week)

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • CiviMail Stylesheet Reference Error

This forum was archived on 2017-11-26.