
Bug: Plural controller or definition name creates issue
Reported by dleffler | February 6th, 2012 @ 03:43 AM | in 2.0.6 (closed)
Because the controller name is photosController (instead of photoController) it doesn't pick up links created by makeLink since it's plural and a singular name is created which is in-line with all the other controller names.
- Plays havoc when trying to find a picture by sef name, etc...
Comments and changes to this ticket
-
dleffler February 6th, 2012 @ 03:53 AM
These may also cause inconsistent response from others due to a similar misnamed state:
- filedownloads table/definition is plural
- companies table/definition is plural
- addresses table/definition is plural
- faqs table/definition is plural
And a couple controllers use odd names between MVC components
- fileController actually works w/ expFile type
- eAlerts models & tables/definitions are expeAlerts which is also plural
-
dleffler February 7th, 2012 @ 08:05 PM
- Assigned user set to dleffler
- Milestone set to 2.1.0
- Milestone order changed from 167 to 0
This is generally nothing seen by the user, so it's not a priority. I have a working local fix created by extending the photosController with photoController.
It does somewhat imply we'll need an upgrade script (optional?) to migrate existing modules which would alter the sectionref, container, & photos tables to change the location from photos to photo.
-
dleffler February 7th, 2012 @ 11:22 PM
fwiw, the plural table names (faqs, filedownloads) create havoc in creating a method in the parent class and being able to programatically refer to the table. This requires us to write a specifc class method to account for this (showall_by_tags)
-
dleffler February 17th, 2012 @ 01:03 AM
- Title changed from Bug: Photoalbum's plural controller name creates issue to Bug: Plural controller or definition name creates issue
The main task will be to:
- create a photoController extending photosController
- copy views/photos to views/photo
- migrate/rename all location_data referring to 'photos...' to 'photo...'
- rename filedownloads and faqs tables to filedownload and faq
- the model names are already correct
These would best be suited to an optional upgrade script
-
dleffler February 29th, 2012 @ 08:29 PM
- Milestone changed from 2.1.0 to 2.0.6
- Milestone order changed from 3 to 0
Some additional notes...
- photoalbum problem fixed locally including upgrade script
- faq
- rename faqs definition filename to faq.php
- rename faqs table to faq with an upgrade script
- filedownloads...same thing
- leave addresses & companies since these are tied to ecommerce
- should move expFile model/definition to file module
- expEalerts module needs some work, separate ticket will be opened
-
expNinja February 29th, 2012 @ 09:24 PM
(from [bc590e9fec4b4355aadcf4c8d37b6c7a003e627b]) Fixes Photoalbum's plural controller name creating issues [#529] https://github.com/exponentcms/exponent-cms/commit/bc590e9fec4b4355...
-
expNinja February 29th, 2012 @ 09:25 PM
(from [e575c56923403cd09df9d9bd277e1f876cddf291]) Deletes old plural named photoalbum views [#529] https://github.com/exponentcms/exponent-cms/commit/e575c56923403cd0...
-
expNinja March 1st, 2012 @ 05:27 PM
(from [d87b5eda48734112866de624dfb57fd9d8bd1592]) Fixes faq & filedownload module singular/plural issue, includes upgrade scripts to fully implement [#529] https://github.com/exponentcms/exponent-cms/commit/d87b5eda48734112...
-
dleffler March 1st, 2012 @ 06:47 PM
- State changed from new to open
Basically, this one is fixed unless someone want to update the address & companies modules (rarely used, but integral to ecommerce)...would require:
- rename addresses & companies definitions to address & company
- comment out the $table line in the assoc models
- create an upgrade script similar to fix_faq_filedownload_modules.php
- and replace all the plural refs to singular (probably not many, but the most difficult part)
-
dleffler March 1st, 2012 @ 06:48 PM
- Tag changed from photoalbum to addressbook, company, photoalbum
-
expNinja March 1st, 2012 @ 08:07 PM
(from [9c5fde533e1428a319ab09cadec54120171858f8]) Upgrade script for faq & filedownload modules to use correct table names [#529] https://github.com/exponentcms/exponent-cms/commit/9c5fde533e1428a3...
-
expNinja March 1st, 2012 @ 08:23 PM
(from [7928d90f1fc3141ac295ed909f399e7bde6faf57]) Remove the now redundant code from faq & filedownload modules [#529] https://github.com/exponentcms/exponent-cms/commit/7928d90f1fc3141a...
-
dleffler March 15th, 2012 @ 07:19 PM
- State changed from open to resolved
The intent of this ticket has been met, HOWEVER the address & companies modules (rarely used, but integral to ecommerce)...still require:
- rename addresses & companies definitions to address & company
- comment out the $table line in the assoc models
- create an upgrade script similar to fix_faq_filedownload_modules.php
- and replace all the plural refs to singular (probably not many, but the most difficult part)
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Bug Tracker for Exponent CMS
Tags
Referenced by
-
489 Feature request - Add tag support to other modules FWIW, faq lacks an sef-url which is howtag groups are lis...
-
145 Upgrade: Add Category feature FWIW, faq and links lack an sef_url which creates an issu...