url - Action not defined in controller cakephp -
I'm having this problem while using Findbyid to get a unique URL for a page on my shared hosting The problem I have is that I get the following error when trying to access a unique page via item ID number on share hosting (I do not get this issue on the local problem):
Error: Action Item Controller Product Controller Error Not defined in: Product Controller :: Items () in the file: App / Controller / Product Controller. FP. Although the item is defined in the Product Controller:
Public function items ($ id = null) {if (! $ Id) {New NotFoundException __ ('product not found')); } $ Items = $ this- & gt; Product-> findById ($ id); If (! $ Item) {insert new notfound exception (__ ('invalid post')); } $ This- & gt; Set ('item', $ item); } You can see the problem on this url:
This works on the local host so that I know what the problem is.
In advance thank you
OK I understand this issue. There was a problem with uploaded files; The uploaded files were incomplete or unavailable, when I checked the ProductsController.php file, I realized that most codes were missing. Reloading to solve the problem.
Note this while coding for other people with a problematic internet connection.
Comments
Post a Comment