0

I have a staging site running at a URL like client.clearbold.com.

I'm using FocusLab's Config, so all my paths and domains are dynamic.

When I link text in a Wygwam field, and choose a Structure Page or a Structure Listing entry, the full URL, including http://client.clearbold.com, is stored in the Wygwam field's contents.

How do I keep this from happening? We'll end up with a site with 100s of links to a Staging subdomain instead of the live URL.

Updated: I've confirmed this is fixed in 2.7. Surprised I haven't seen this before, though I'm wondering how many links were applied within content fields on previous projects.

1

It's all handled auto-magically. As long as you don't create links in source mode, it'll work when you change the domain/address/environment as of Wygwam 2.7.

See Also: Dynamic Filepaths to Assets Files in Wygwam Fields

| improve this answer | |
  • But I'm seeing them in Source mode, and when I copy the database down to dev and follow those links, they go to the Staging URL, not my local URL. – Mark J. Reeves Feb 8 '13 at 21:35
  • Right; that's what threw me off and made and led me to post my question. It "just worked" when we recently moved our site from development, to staging, to production. – Nick Benson Feb 8 '13 at 21:37
  • The full URLs are in the database as well. This is Structure, not Assets. – Mark J. Reeves Feb 8 '13 at 21:38
  • Yes; I'm reading what you're saying... links to Structure pages in Wygwam fields continued working (despite showing as full URL's in source mode) when we moved from dev/staging/production across different domains. – Nick Benson Feb 8 '13 at 21:40
  • So this has been an issue that's just been fixed? I'm on 2.6.3. I don't recall this happening in other sites. – Mark J. Reeves Feb 8 '13 at 21:41
0

I had a similar but different issue in my environment. Because my site is being reverse-proxied into another domain and uses CE-Cache, all links created with the "Structure" link type in Wygwam were getting cached with the Origin domain.

My fix was to add a line to wygwam/helper.php right after line 948:

$urls[] = str_replace("origindomain.com","destinationdomain.com",$page[4]);

This effectively ensured that all of those full-path Structure links generated within Wygwam fields rendered the destination domain rather than the Origin that's read by Akamai.

| improve this answer | |
  • That could be helpful for the ones I'm stuck with. Thanks! – Mark J. Reeves Feb 9 '13 at 15:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.