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 and dojo? Messing up a link (not the relative link error though)
Pages: [1]

Author Topic: CiviMail and dojo? Messing up a link (not the relative link error though)  (Read 6239 times)

alfred_nutile

  • Ask me questions
  • ****
  • Posts: 464
  • Karma: 14
    • River Valley Tech Collective
CiviMail and dojo? Messing up a link (not the relative link error though)
December 05, 2007, 08:57:57 am
So it all happened when the end user copied one link on the page to another place on the page.
Then for every test email and email after that the second link did not work.
It would show up like this
h ttp://nationalpriorities.org/cms/sites/all/modules/civicrm/extern/url.php?u=25543&qid=47158
Notice the space in the http.
We fixed it, removed it, renamed it, edited the html, and still 2 hours of testing came down to us just canceling and starting over.
Now I looked in the database and all was well.
Even the preview window looked okay when I hovered my mouse over it.
He was using Firefox on Windows XP
We just junked it and started over and all worked fine.
Should I put this in as a bug.





Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: CiviMail and dojo? Messing up a link (not the relative link error though)
December 05, 2007, 09:56:01 pm
Is there a chance this was on a single, rather long line?

Some email servers have a 999-character limit to line length in emails, and if any given email line is longer, these servers simply insert a space and break the line hard.
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

alfred_nutile

  • Ask me questions
  • ****
  • Posts: 464
  • Karma: 14
    • River Valley Tech Collective
Re: CiviMail and dojo? Messing up a link (not the relative link error though)
December 06, 2007, 01:51:53 am
The line was this actually the same as two lines above that worked fine.
And worked in the second email without a hitch.

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: CiviMail and dojo? Messing up a link (not the relative link error though)
December 06, 2007, 02:31:31 am
Hm, I have no idea what was the problem, then. I grepped our sources and we don’t have a misspelt ‘h ttp’ anywhere.
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

alfred_nutile

  • Ask me questions
  • ****
  • Posts: 464
  • Karma: 14
    • River Valley Tech Collective
Re: CiviMail and dojo? Messing up a link (not the relative link error though)
December 06, 2007, 02:56:54 am
Not sure who's sources you grepped  ???
Here is the code from the errored email
Quote
<br>Dear Friend,<br><br>The National Priorities Project (NPP) has made a resolution for the New Year. NPP will expose the cost of defending US oil supply and build the case for investing in clean energy instead.<br><br>But we cannot do it alone, so we are asking you to join our efforts and give <a href="http://nationalpriorities.org/cms/sites/all/modules/civicrm/extern/url.php?u=25430&qid=47139">now</a>.&nbsp; We have already raised over $50,000 and are halfway to our goal.<br><br>NPP has led the way in bringing the cost of our current national security policies to the public. From the Iraq war to nuclear weapons, you can find out the cost to your community by clicking <a href="http://nationalpriorities.org/cms/sites/all/modules/civicrm/extern/url.php?u=25450&qid=47139">here</a>. <br><br>Now we are prepared to tackle the failed energy policies that cost us precious dollars and an even more precious planet.<br><br>You can help NPP make this change possible by giving <a href="h
 ttp://nationalpriorities.org/cms/sites/all/modules/civicrm/extern/url.php?u=25525&qid=47139" target="_blank">now</a>.<br><br>In this holiday season, what better gift for our children and grand children than a safer and sustainable world?<br><br>Thank you,<br>Greg Speeter, Executive Director<br><br>P.S. Whether it is $50 or $5,000, your gift is essential. Every dollar given is tax deductible and will be spent on uncovering the cost of oil. Please donate at <a href="http://nationalpriorities.org/cms/sites/all/modules/civicrm/extern/url.php?u=25525&qid=47139">www.nationalpriorities.org/support</a>.<br>

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: CiviMail and dojo? Messing up a link (not the relative link error though)
December 06, 2007, 09:46:16 pm
I mean, if we replaced any URLs with a broken ‘h ttp’, this sting would’ve appear somewhere in our sources (the CiviCRM’s PHP code).

If you look at the HTML you quoted, you’ll see that you have two lines in there, and the first one is 990 characters long. Now I’m pretty sure it’s your server that wraps the email lines after (more-or-less) 990/999-ish character.

Can you try making a multi-line template and see whether this fixes the issue?

(Note: You can safely make a multi-line template without changing how the resulting emails look, as HTML breaks lines only on <br /> tags, not on actual newlines.)
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

alfred_nutile

  • Ask me questions
  • ****
  • Posts: 464
  • Karma: 14
    • River Valley Tech Collective
Re: CiviMail and dojo? Messing up a link (not the relative link error though)
December 07, 2007, 03:42:50 am
I will try but what I do not understand is this.
We tok that same email that did not work.
Copied pasted it into a new email.
Removed the space between the h
and it worked.
????

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: CiviMail and dojo? Messing up a link (not the relative link error though)
December 07, 2007, 04:17:16 am
When you pasted it into new email, most probably your email client wrapped the lines by itself (i.e., added hard newlines on spaces before the 990th character at any given line).
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

alfred_nutile

  • Ask me questions
  • ****
  • Posts: 464
  • Karma: 14
    • River Valley Tech Collective
Re: CiviMail and dojo? Messing up a link (not the relative link error though)
December 07, 2007, 04:47:04 am
I see. Okay I will look at this in the morning

alfred_nutile

  • Ask me questions
  • ****
  • Posts: 464
  • Karma: 14
    • River Valley Tech Collective
Re: CiviMail and dojo? Messing up a link (not the relative link error though)
December 11, 2007, 11:45:08 am
follow up on this.
So it happened again and here is how I got around.
First I tried to do a ton of things the best result was.
One. This happened both times on the second link, this time it just messed up the url and added  %% near the end?
Two. If I made a a link after this that linked, with all the same wording, worked.  But if I removed the link before this it then
broke it again.
So with that said I decided to copy paste the HTML out and put it into Kompozer and just upload the file like I use to and it all worked.
Al

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: CiviMail and dojo? Messing up a link (not the relative link error though)
December 12, 2007, 01:43:56 am
I see you’ve filed CRM-2477 – I commented there what should be (IMHO) our solution for this.
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

alfred_nutile

  • Ask me questions
  • ****
  • Posts: 464
  • Karma: 14
    • River Valley Tech Collective
Re: CiviMail and dojo? Messing up a link (not the relative link error though)
December 12, 2007, 02:09:20 am
Alright if this is true then help me understand
One Why it works when I upload the file instead.
Two What it worked (same line same everything with no extra line breaks ie even longer) when I add the link after it to see if it is a link number problem?
( -:

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: CiviMail and dojo? Messing up a link (not the relative link error though)
December 12, 2007, 02:23:30 am
Quote from: alfred_nutile on December 12, 2007, 02:09:20 am
One Why it works when I upload the file instead.

Maybe the file got wrapped (properly, i.e., on a space) somewhere along the way?

Quote from: alfred_nutile on December 12, 2007, 02:09:20 am
Two What it worked (same line same everything with no extra line breaks ie even longer) when I add the link after it to see if it is a link number problem?

Because after the mailserver breaks the line hard in the middle of the previous link, this second link is near the beginning of a new line, so there’s no point in breaking it. :)
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

alfred_nutile

  • Ask me questions
  • ****
  • Posts: 464
  • Karma: 14
    • River Valley Tech Collective
Re: CiviMail and dojo? Messing up a link (not the relative link error though)
December 12, 2007, 03:20:53 am
So what you are saying is that Kompozer "Maybe the file got wrapped" wrapped the file properly?
Would that mean dojo is to blame?
Seems these two emails that I have had a problem with are nothing out of the ordinary.
This office used PHPList previous to this never having this problem.
I guess we will stick with upload file which leaves me feeling dojo is still to new.
That is fine just as long as this is considered a bug, ie something that should work and does work
in phpList using FCK editor and not dojo?
Thanks for following through on this with me.


Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: CiviMail and dojo? Messing up a link (not the relative link error though)
December 12, 2007, 03:51:45 am
Personally, I believe this kind of line-wrapping should be done as late in the code chain as possible; I think it should be done by the proper PEAR class, but we don’t want to hack third party code unless strictly necessary, so we should do this in our wrapper send() function.

I don’t really want to dig too much into where exactly the difference lies at the moment (it’s a bit moot if send() is to be patched accordingly).
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • CiviMail and dojo? Messing up a link (not the relative link error though)

This forum was archived on 2017-11-26.