Login!
Lost password?
 

MODx Bug/Feature Tracker and Feature Requests

Welcome to the MODx CMS Tracker. Please choose the appropriate project from the drop down menu and provide as much information as possible regarding your server environment and browser. Thanks!

FS#321 — Numerical Alias failures

Attached to Project — MODx
Opened by Anonymous Submitter - Friday, 24 March 2006, 02:39AM
Last edited by Garry Nutting (garryn) - Tuesday, 05 September 2006, 05:02PM
Task Type Bug Report
Category Core Distribution
Status Closed
Assigned To Garry Nutting (garryn)
Operating System Windows
Severity Medium
Priority Normal
Reported Version 0.9.1
Due in Version 0.9.5
Due Date Undecided
Percent Complete 100%

Details

Hi, I encountered a problem when using a numerical alias i.e. 2006 for a folder which handles yearly and monthly archives. I understand the problem being that MODX interprets "2006" as a document id, however this could create problems further down the line for sites that utilise a blog, article or issue archive.

The only way I could get around the problem was by linking to a summary document as the landing page from my navigation. This involved seperate calls to dropdownmenu and was quite an arse-about-face way of skirting the problem.
This task depends upon

This task blocks these from closing
Closed by  Garry Nutting (garryn)
Wednesday, 08 November 2006, 05:03PM
Reason for closing:  Fixed
Comment by Ryan Thrash (rthrash) - Friday, 04 August 2006, 10:22AM
We need to insert logic to check for alias names starting with a number and display an error message if they do.

Comment by Garry Nutting (garryn) - Tuesday, 05 September 2006, 05:02PM
  • Field changed: Status (Unconfirmed → Requires testing)
  • Field changed: Percent Complete (0% → 100%)
  • Task assigned to Garry Nutting (garryn)
I think this has been partly fixed in the SVN trunk already, if a numerical alias is used - as long as it's present in the documentListing array in the parser (which it should be) then the alias will take precedence over the page ID value.

The problem is if Friendly Alias Paths and an incorrect numerical alias is referenced in the path, for example:

http://mysite.com/2006/05 (where 05 is not a folder)

In this example, then the page with ID of 5 would be returned, not really ideal for archiving purposes.

Basically, in my fix for  FS#476 , if friendly alias paths are used then document IDs passed in the URL are tied to the virtual directory structure. To this end, numerical aliases could safely be used for directory structures without having a risk of it returning the incorrect page. It will be possible to create directory structures such as:

http:/mysite.com/2006/08/01/