Closed (fixed)
Project:
Search by Page
Version:
7.x-1.x-dev
Component:
Search by Page Paths module
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
15 Nov 2011 at 18:30 UTC
Updated:
3 Jul 2012 at 23:01 UTC
One of the pages I've added to the Search by Pages paths list is a view with a path alias. I've tried added this page with the "Page to index" value being either the page path or the alias, but in both cases I get an error on cron being run:
TYPE search_by_page
DATE Tuesday, November 15, 2011 - 13:11
USER Anonymous (not verified)
LOCATION http://example.com/admin/config/system/cron
REFERRER http://example.com/admin/config/system/cron
MESSAGE Content not rendered (not found) - PID (559), path (find/resources/books-&-e-books), language (en)
SEVERITY error
HOSTNAME <snip>
OPERATIONS
The page "find/resources/books-&-e-books" exists, so I'm not sure why Search by Page can not find it. Any thoughts?
Thank you.
Comments
Comment #1
jhodgdon& is actually not a valid URL character, so maybe that is the problem?
Comment #2
somanyfish commentedYup, that's why I made an alias. The URL is coming from a taxonomy term (books & e-books). I'm passing this term in as a contextual filter to a view. Drupal seems to think this taxonomy term should create the path "find/resources/books-&-e-books", so I made an alias of "find/resources/books-and-ebooks" for it. When I enter this alias in the "Page to index" value on Search by Pages edit path page, I get the same error on running cron, except the "Content not rendered" message refers to the alias.
Comment #3
jhodgdonWell, the problem with that approach is that Drupal and Search by Page are going to at some point be using the real URL and not the alias. All I can tell from the log message you pasted above is that Search by Page got basically a 404 error when requesting that path from Drupal... since I am not on your system, I can't tell why, but I'm guessing either there is a typo in the URL, or that the & in the path confused either Search by Page or Drupal about that request.
Comment #4
somanyfish commentedThanks for helping me think this through. I believe that this is a Views problem, not a Search by Pages problem. For anyone interested in looking further into this, check out Term ID converted to name URL: spaces and special characters.
Comment #5
jhodgdonThe problem here is really that a real URL cannot contain a &, since that is the character that is used in HTTP to indicate query args. So this is not really a Search by Page bug at all, since it recognizes & as a query arg, and will treat a URL path like 'ind/resources/books-&-e-books' as ind/resources/books- with an improperly-formatted query arg. So this path simply won't work and isn't valid.