Forums

CC breaks template when logged in as Super Admin

Joe Stokes 02 Feb, 2011
Hi all,

First of all, this is a new application of this wonderful component. Do check it out (go to the Business Portal and browse around in the Business Directory and see my application of cc and cf in action). http://www.isupportlagos.com. It has full public access.

I'm using cc to access my own set of tables in MySQL using some complex saved views. I also do a number of database queries to various tables in both the Header and Body sections of the connection code.

I have encountered a problem with things going horribly wrong when I log in as a user with Super Administrator rights and try to navigate around in the Business Directory. I include here two screen shots to show what happens.

This first one is being not logged in and relying on the normal public access process. (All is fine)


This second one shows what happens when I'm logged in as Super Administrator. I have included in the screen-shot, the Inspect Element HTML code pane which shows how everything else has been stripped out of the template and only the Header section of the Chronoconnect component is rendered.


I do not have this problem with a normal "Registered" user being logged in. I just had to give all the registered users permissions to access this connection - it is a bit of a schlep, but at least it works for now. (You can also try this out with User: "Piet Pompies" and Password: "piet")

Any help will be greatly appreciated.
(If you send a private message back, I can give you a username and password to access the back-end of the site)

I would like to get this resolved (I need my site to work right, ok?) before I can properly document the application and post it back into this forum for others to use and expand on.

Regards

Joe
GreyHead 02 Feb, 2011
Hi Joe,

My compliments on a very nice CF+CC application.

I'm at a bit of a loss as to why you'd lose the template when you log in as a Super Admin. There's nothing obvious in CC that will do this. There are two ways to show a page without a template = adding tmpl=component to the page URL or using index2.php (now deprecated). Is there anywhere that one of these might be being triggered?

By all means email or PM me the site URL and a SuperAdmin login and I'll take a quick look.

Bob
GreyHead 02 Feb, 2011
Hi Joe,

I took a quick look. As you say there is nothing in the CC code to explain this. I wonder if it might be a side-effect of using Views in some way (the underlying code for CC isn’t very elegant). I'll have a dig around and see if I can replicate it :-(

Bob
Joe Stokes 02 Feb, 2011
Hi GreyHead,

I found a work-around. It is quite simple and may give you a better idea as to where the problem could originated from.

I've gone back to each connection.
In the Front End settings I applied the following:

In the Groups Permissions section:
View User Groups: Public Users - Guests (only)
New record: None (deselect all that were selected)
Edit record : None (deselect all that were selected)
Delete record: None (deselect all that were selected)

Front End Per User Permissions section:
View Users: Select all (if one is not selected, that user gets an access rights violation message)
New record users: None (deselect all that were selected)
Edit record users: None (deselect all that were selected)
Delete record users: None (deselect all that were selected)

I applied this to all the connections and then logged in as the usual master administrator.
Everything works fine - no funnies.

In my view, the problem may arise out of the access rights portion of your code. Now, I don't know how you are interfacing with the Joomla permissions with your chronoconnect component, but that may perhaps be where something goes wrong. I would appear (if I apply my weird logic), as I am not using the New, Edit and Delete functions, that it could have some effect on how things happen.

I hope this helps to get to the bottom if the problem, as my next challenge is to combine the functions of the Business_Registration_Register connection with the Business_Information_Form to create a similar interface as one has in MS Access Forms, where you have the records displayed in a grid and the form for editing etc. below the grid. This is to be with access rights for administrators only.

So it will have to wait for now.

In the mean time, I can manage with the work-around for now. But please keep me posted along the way.

Thanks for a great component and very fast support.

Regards

Joe
GreyHead 05 Feb, 2011
Hi Joe,

Thanks for the report. I spent a while poking around the code but still can't see why this is behaving quite as it does :-(

Bob
This topic is locked and no more replies can be posted.

VPS & Email Hosting 20% discount
hostinger