CMS MADE SIMPLE FORGE

Newsletter Made Simple

 

[#8380] Calling news articles - links problem

avatar
Created By: Mich-adg (Mich)
Date Submitted: Tue Sep 11 06:01:33 -0400 2012

Assigned To:
Version: 2.3.2
CMSMS Version: 1.9.4.3
Severity: Major
Resolution: Invalid
State: Closed
Summary:
Calling news articles - links problem
Detailed Description:
Hi,

when calling news articles in a message, the links are not complete, here's what
i get:

http://www.mysite.com/news/16//news-article.html

A parameter is missing between the / / (number 62).

Thx for any help.


History

Comments
avatar
Date: 2012-09-11 06:23
Posted By: Mich-adg (Mich)

Actually i use the "url" extra field in each news article, it works fine.
      
avatar
Date: 2012-09-14 23:45
Posted By: Robert Campbell (calguy1000)

Old version of NMS ... please provide sufficient information to reproduce the
problem in the latest version of NMS with the latest version of CMSMS.
      
avatar
Date: 2012-10-19 07:19
Posted By: Peter Stubbs (applejack1923)

If in TinyMCE use relative URL's is checked in NMS in the message content block
if a URL is entered relatively in the received mail the URL is missing one /
i.e. http:/ instaed of http://

NMS 2.5.6
CGJObMgr 1.2.7
TinyMCE 2.9.11
CMS 1.10.3
      
avatar
Date: 2014-09-03 04:42
Posted By: Ferdi Verlaan (nemfasis)

This worked for me;
Locate the  function _make_ab in modules/NMS/function.utils.php. Find the lines:

  if ($REMOVE_LEADING_DOTS) { 
    while (count($base_array) and preg_match("/^\.\.?$/", $base_array[0])) { 
      array_shift($base_array); 
    } 
  } 
  $result = $base_start . '/' . implode("/", $base_array); 
  return $result;
}

change it to:

  if ($REMOVE_LEADING_DOTS) { 
    while (count($base_array) and preg_match("/^\.\.?$/", $base_array[0])) { 
      array_shift($base_array); 
    } 
  } 
  $result = $base_start . '/' . implode("/", $base_array); 
  //$result = str_replace('//','/',$result);
  return $result;
}

I don't know what the effects are on the long therm, with leading ../ etc. but
it worked in my case.
      
avatar
Date: 2014-09-03 04:44
Posted By: Ferdi Verlaan (nemfasis)

This worked for me;
Locate the  function _make_ab in modules/NMS/function.utils.php. Find the lines:

  if ($REMOVE_LEADING_DOTS) { 
    while (count($base_array) and preg_match("/^\.\.?$/", $base_array[0])) { 
      array_shift($base_array); 
    } 
  } 
  $result = $base_start . '/' . implode("/", $base_array); 
  $result = str_replace('//','/',$result);
  return $result;
}

change it to:

  if ($REMOVE_LEADING_DOTS) { 
    while (count($base_array) and preg_match("/^\.\.?$/", $base_array[0])) { 
      array_shift($base_array); 
    } 
  } 
  $result = $base_start . '/' . implode("/", $base_array); 
  //$result = str_replace('//','/',$result);
  return $result;
}

I don't know what the effects are on the long term, with leading ../ etc. but
it worked in my case.
      
Updates

Updated: 2013-04-23 09:31
state: Open => Closed

Updated: 2012-09-14 23:45
resolution_id: 5 => 9

Updated: 2012-09-11 06:23
resolution_id: => 5