? Success

User tests: Successful: Unsuccessful:

avatar izharaazmi
izharaazmi
13 Mar 2016

Currently the "controllers", "models", "tables" etc folder names are used in many components. However we are supposed to start using singular forms "controller", "model", "table" etc so as to support autoloading of these classes.

Summary of Changes

The model prefix is being calculated from the controller name which is always in lowercase. This causes evaluating the model prefix as sampleModel instead of SampleModel assuming component as com_sample. This breaks autoload for the model.

Testing Instructions

Create a small empty component using "model" as folder name for models. (or rename the "models" folder) and try to get some data from the model like $this->get('Data'); which should get the data from SampleModelSample::getData() and display, ideally!

I created a sample component from component-creator.com and modified it for this demo. Use it if you want. See attachment below.

Open the URL: index.php?option=com_sample in your front-end.

Result

Without this patch: Nothing is shown
After this patch: You see "Hello Joomla!"

Attachment

com_sample.zip

avatar izharaazmi izharaazmi - open - 13 Mar 2016
avatar izharaazmi izharaazmi - change - 13 Mar 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 13 Mar 2016
Labels Added: ?
avatar brianteeman brianteeman - change - 13 Mar 2016
Category Libraries
avatar zero-24 zero-24 - test_item - 13 Mar 2016 - Tested successfully
avatar zero-24
zero-24 - comment - 13 Mar 2016

I have tested this item :white_check_mark: successfully on 52bcb7d

works here thanks.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9409.

avatar nikitadhiman nikitadhiman - test_item - 16 Mar 2016 - Tested successfully
avatar nikitadhiman
nikitadhiman - comment - 16 Mar 2016

I have tested this item :white_check_mark: successfully on 52bcb7d

Patch works


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9409.

avatar brianteeman brianteeman - change - 15 Apr 2016
Status Pending Ready to Commit
avatar brianteeman
brianteeman - comment - 15 Apr 2016

RTC - thanks


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9409.

avatar joomla-cms-bot joomla-cms-bot - change - 15 Apr 2016
Labels Added: ?
avatar brianteeman brianteeman - change - 15 Apr 2016
Milestone Added:
avatar rdeutz rdeutz - change - 15 Apr 2016
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2016-04-15 12:14:44
Closed_By rdeutz
avatar rdeutz rdeutz - close - 15 Apr 2016
avatar rdeutz rdeutz - merge - 15 Apr 2016
avatar joomla-cms-bot joomla-cms-bot - close - 15 Apr 2016
avatar rdeutz rdeutz - reference | b30dafe - 15 Apr 16
avatar rdeutz rdeutz - merge - 15 Apr 2016
avatar rdeutz rdeutz - close - 15 Apr 2016
avatar joomla-cms-bot joomla-cms-bot - change - 15 Apr 2016
Labels Removed: ?
avatar rdeutz rdeutz - change - 1 May 2016
Milestone Removed:
avatar rdeutz rdeutz - change - 1 May 2016
Milestone Added:
avatar rdeutz rdeutz - change - 1 May 2016
Milestone Added:
avatar rdeutz rdeutz - change - 1 May 2016
Milestone Removed:

Add a Comment

Login with GitHub to post a comment