You are here:  » Strange url


Strange url

Submitted by wesse249 on Sat, 2015-03-21 19:58 in

Hello,

i have in all my category url's this sign - see for example this url http://www.example.com/category/-Ladekastjes/

Can you tell me where i need to look to remove?

Thank you

Submitted by support on Sun, 2015-03-22 10:55

Hello Jan,

The leading "-" indicates that category values have made it into the database with a leading SPACE (spaces are replaced with "-" in the clean URLs) however this _shouldn't_ be able to happen because feed values are trimmed on import, as are custom entered master category names in Product Mapping, however it _could_ happen as a result of filters.

If that could be the case, you could add a new "Trim" filter to your site by adding the following code to includes/filter.php

  /*************************************************/
  /* Trim */
  /*************************************************/
  $filter_names["trim"] = "Trim";
  function filter_trimConfigure($filter_data)
  {
    print "<p>There are no additional configuration parameters for this filter.</p>";
  }
  function filter_trimValidate($filter_data)
  {
  }
  function filter_trimExec($filter_data,$text)
  {
    return trim($text);
  }

Attached to the Category field in any per-feed filters you may have operating against the Category field, and make sure that it is last in the sequence.

If that's not the case, let me know and i'll check it out further with you...

Cheers,
David.
--
PriceTapestry.com