User tests: Successful: Unsuccessful:
This is a recommit of #4317 which was meshed up!
Reaveal a trimmed path on an error message produced in /libraries/loader.php instead of the actual real path
None
Try renaming a library, so its unavailable. Loader will come up with an error 500 and the message
Library path /Applications/Mamp…. cannot be found.
which is too liberal.
Apply the patch and re run
message should be Library path /libraries/... cannot be found.
Labels |
Added:
?
|
Title |
|
Category | ⇒ | Code style Libraries |
Title |
|
@test removed the newsfeed library and loaded the newsfeed component and observed the error
Fatal error: Class 'JFeed' not found in /Applications/MAMP/htdocs/Joomla_3.3.6-Stable-Full_Package/libraries/joomla/feed/parser.php on line 66
Applied patch
Fatal error: Class 'JFeed' not found in /Applications/MAMP/htdocs/Joomla_3.3.6-Stable-Full_Package/libraries/joomla/feed/parser.php on line 66
So no change
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/4770.
@brianteeman I think you used my first instructions for testing, which obviously were wrong. Actually all you have to do is:
In Protostar's index.php after defined('_JEXEC') or die; add this code (one line at a time):
JLoader::registerPrefix('XY', JPATH_PLATFORM . '/notfound');
and
JLoader::registerNamespace('XYZ', JPATH_LIBRARIES . '/notagain');
Yes I did as there is a sync issue with the original post on github and jissues
However that would not make any difference to my test. My test produced the error message that you are trying to prevent.
@brianteeman Actually loader.php has a handful of methods and just removing a folder doesn’t really assures that the 2 methods where the changes made are gonna get called. This PR will not fix universally this, it touches only the 2 methods I just comment about few comments above. Thus your testing truthfully gives other msg because most probably another method was called. You have to make sure that registerPrefix and registerNamespace are called, so it’s better to use the instructions in this page. Sorry for the confusion here.
@brianteeman here are my results:
@brianteeman The error message you get is a PHP error message, the one we are modifying here is a Joomla error message. I don't think we have control over the PHP error message.
@test All good. After applying the patch, the path is no longer shown.
Status | Pending | ⇒ | Ready to Commit |
Moving to RTC as we have 2 successful tests.
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/4770.
Milestone |
Added: |
OK here. Merging.
Status | Ready to Commit | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2014-11-15 07:36:42 |
@dgt41 I have sync the description and title here.