url cutoff by link module or pagepeeker formatter

Created on 31 May 2012, over 12 years ago
Updated 31 August 2024, 3 months ago

I have created an rss feed from google alerts that I am mapping into fields. I have had success mapping into all the fields except the link module field where I have put a field formatter that creates a pagepeeker screenshot by attaching the appropriate url server query to the feeds url. Feeds is doing its job by taking the Item URL (link) and putting it into the field correctly. I am having an issue with with either pagepeeker or link module because below keeps happening.

To recap-

Google Alert feed -> Link module field -> pagepeeker screenshot formatter

here's the error

The url that google alerts provides is

http://www.google.com/url?sa=X&q=http://www.beautyjunkiesunite.com/WP/20...

When the link is displayed I get :

http://pagepeeker.com/thumbs.php?size=m&url=www.google.com/url

Its cutting the url at url and not getting the rest of the url.

Here's the code that pagepeeker uses to parse the url ?

function _pagepeeker_format_url($url, $domain_only = FALSE) {
  if (filter_var($url, FILTER_VALIDATE_URL) === FALSE) {
    return FALSE;
  }

  // try to parse the url
  $parsed_url = parse_url($url);
  if (!empty($parsed_url)) {
    $host = (!empty($parsed_url['host'])) ? $parsed_url['host'] : '';
    $port = (!empty($parsed_url['port'])) ? ':' . $parsed_url['port'] : '';
    $path = (!empty($parsed_url['path'])) ? $parsed_url['path'] : '';
    $query = (!empty($parsed_url['query'])) ? '?' . $parsed_url['query'] : '';
    $fragment = (!empty($parsed_url['fragment'])) ? '#' . $parsed_url['fragment'] : '';

    if ($domain_only) {
      return $host . $port;
    }
    else {
      return $host . $port . $path . $query . $fragment;
    }
  }

  return FALSE;
}

Could this be the problem?

Please let me know I can clarify in any way.

What I need is for the entire url to get processed and not just the truncated one

Thanks !

πŸ’¬ Support request
Status

Closed: outdated

Version

1.0

Component

Miscellaneous

Created by

πŸ‡ΊπŸ‡ΈUnited States naeluh

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • πŸ‡«πŸ‡·France dqd London | N.Y.C | Paris | Hamburg | Berlin

    I'll close this issue due to inactivity for 12 years and upcoming EOL of Drupal 7 in January 2025 β†’ . While the project version for Drupal 7 will keep providing support for security issues and website breaking bug fixes for Drupal 7, we should try to minimize the open issues for Drupal 7 in the queue as much as possible. Thanks for the report and all the efforts in here. Feel free to re-open if you can provide a fix or found an additional related problem which increases the issue priority to "Critical" here.

Production build 0.71.5 2024