5

This site was copied to a new domain when it started breaking. Is there some setting somewhere I need to update, so it knows how to build working URLs again?

  • did you try to clear the cache? – Kgaut Aug 18 '11 at 19:12
10

Pass node/16, instead of /node/16.

The API reference for l() tells you that the $path argument is passed to the url() function. url() considers "/node/16" as a full URL (although the term "full URL" is not formally defined).

  • Huh you're right. I was using the node->path field. I changed to using node->nid and just concatenating node/ to it when I build the link. – Joren Aug 18 '11 at 20:47
  • the node->path shouldnt contain a leading slash either. – user49 Nov 4 '11 at 4:56

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.