0

I have a number of nodes of a content type in which the body contains links using bit.ly. These links no longer resolve due to domain name changes to the original link that was 'bitlyed'.

I've been correcting these manually:

  • Find all nodes of type news with bit.ly link in body
  • Foreach node,
  • View node
  • Click on bit.ly link
  • Edit url in browser so that it resolves to file (pdfs)
  • Download file to local
  • In Drupal, upload file via Content->Add Media->File
  • Edit body in node to replace bit.ly link with link to file on Drupal instance
  • Save edits
  • Next node

There are a goodly number of nodes to do this to; I also have a number of instances where the link is not bit.ly, but is to a domain that will be retired.

To me, this just screams for automation, but I know I need to do it via Drupal as much as possible.

Is this worth undertaking creating a module? Or is there another way that's advised?

Any help will be appreciated.

  • You had bit.ly links to pdf files on remote websites, which you're attaching to your nodes now? – bigboy Apr 15 at 21:45

Your Answer

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

Browse other questions tagged or ask your own question.