Welcome, Guest
Username: Password: Remember me

TOPIC: [SOLVED] Error 500 - Not Authorised

Error 500 - Not Authorised 17 Jul 2015 11:39 #13335

  • MorganL
  • MorganL's Avatar
  • Offline
  • Platinum Member
  • Posts: 438
  • Thank you received: 53
  • Karma: 16
Getting a very strange problem that has not occured on any of my components before

Public / Guests can usually always see my components (front end) however with ONE particular table

- Public / Guests can see the GRID layout
- When public / guests try to click an ITEM I am getting

500
ERROR: 500
You are not authorised to view this resource.

I have checked views, models, XML files and am at a complete loss. The permission of the component are standard and no view has its own ACL

If I login as a normal registered user, I can see the item no problems

Can anyone advise

Joomla 3.3.5
Latest J-Cook
Morgan Leecy MCSE

Novell / Linux
PHP. MYSQL, Apache, node.js
Coldfusion, JQuery, HTML5
Joomla
The administrator has disabled public write access.

Error 500 - Not Authorised 17 Jul 2015 12:12 #13336

  • admin
  • admin's Avatar
  • Online
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
Are you using Access wizard ?
Wich PTL ?
Coding is now a piece of cake
The administrator has disabled public write access.

Error 500 - Not Authorised 17 Jul 2015 13:03 #13337

  • MorganL
  • MorganL's Avatar
  • Offline
  • Platinum Member
  • Posts: 438
  • Thank you received: 53
  • Karma: 16
Nope, no access wizard.. though I may have had one in the past which I removed.. so I may have a fork somewhere.

I have checked the models, the view.php.html for two individual item views, both look the same yet one item can be viewed not logged in, and the other cant!

SO there must be something somewhere I have set from a previous version that had ACL in it, not sure the project can help as ACCESS wizard is deffo reomved

However its the project beginning with Pin.....

Table Pins
Layout (Front End) Pin (accessed from My Pins)
Morgan Leecy MCSE

Novell / Linux
PHP. MYSQL, Apache, node.js
Coldfusion, JQuery, HTML5
Joomla
The administrator has disabled public write access.

Error 500 - Not Authorised 17 Jul 2015 13:34 #13338

  • admin
  • admin's Avatar
  • Online
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
Simple.

You have a form in the page, so you must define the correct ACL for the gests to be able to edit in front-end. canEdit()

This is the incriminated line in your view :
//Check ACL before opening the form (prevent from direct access)
if (!$model->canEdit($item, true))
	$model->setError(JText::_('JERROR_ALERTNOAUTHOR'));

But not only, because the model is also checking the ACL to save the item, so let's do it correctly with ACL.

I can see you don't have 'Save' button in the toolbar. So what is the porpose of having such inputs fields in this front layout ?
In short terms, what do you expect from your users there ? Can they submit informations ?
Coding is now a piece of cake
The administrator has disabled public write access.
The following user(s) said Thank You: MorganL

Error 500 - Not Authorised 17 Jul 2015 13:37 #13339

  • MorganL
  • MorganL's Avatar
  • Offline
  • Platinum Member
  • Posts: 438
  • Thank you received: 53
  • Karma: 16
That form brick should not be there

DOH!

Well spotted and now I am going to slink off with my tail between my legs for such a basic mistake.. it should be a FLY BRICK!
Morgan Leecy MCSE

Novell / Linux
PHP. MYSQL, Apache, node.js
Coldfusion, JQuery, HTML5
Joomla
The administrator has disabled public write access.

Error 500 - Not Authorised 17 Jul 2015 13:43 #13340

  • admin
  • admin's Avatar
  • Online
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
But also, Cook should be able to hide the link in case that the action is not permitted.
Coding is now a piece of cake
The administrator has disabled public write access.
Time to create page: 0.089 seconds

Get Started