Confirmed opt-in link incorrectly constructed

We are trying to send out “confirm opt-in” emails and finding that the mechanism has “doubled-up” the link URL. We have “site_url” set to “http://suite.ylem.com” in config.php (this is a virtual server rewritten to document root /ylem/www/html/yescrm_ylem_live in the apache configuration file), and the opt-in link in the email that is generated has the URL

 "http://suite.ylem.com/http://suite.ylem.com/index.php .......".

Any idea how this has happened and how we can fix it? Possibly we have screwed up the email template somehow?

Version is 7.10.5 (have just upgraded from 7.10.2).

See if this helps you

https://suitecrm.com/suitecrm/forum/suitecrm-7-0-discussion/19021-confirmed-opt-in-template

I managed to fix the problem by dumping the offending email_templates record to file, deleting the record, editing the file and reloading the record from that file. Maybe there is an easier way?

I have not had time to check it out thoroughly, but I suspect I may have introduced the “doubled” URL when I used the “duplicate” option on an existing template - could it be that the duplication mechanism expands the $sugarurl variable before it saves the record, and then tacks $sugarurl on as well, so the new template ends up containing “myURL.com/$sugarurl” ?