Sunday, September 25, 2011

admin url gives error: cannot be accessed directly

Hello.
while trying to generate a pdf of my admin view with the html2ps
"plugin" I get the error that the admin_view cannot be accessed
directly. (works fine without admin routing)

The problem is in this line of the code:
$Pdf->process(Router::url('/', true) . 'queues/admin_view/'. $id);

while searching this archive I read that I need to declare
admin'=>true

I have read the cake docs and tried the following change but this only
return a blank page.

$Pdf->process(Router::url('/',
array('admin'=>true,'controller'=>'queues','action'=>'view', $id)));

can anyone see what I am doing wrong?

Thanks
Robert

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate