[TYPO3-dev] Custom module shows blank page with non-admin users.

Jason Alexander jalexander at digipen.edu
Mon Feb 1 02:59:08 CET 2010


Andreas, Thanks for offering to help. but I did remove the form tags. But that didn't resolve the issue of the content of the module not showing up when a non-admin user is logged in. This is what I have come up with so far. In the index.php file of my module. It fails here and goes to the else statement instead.


// Access check!
// The page will show only if there is a valid page and if this page may be viewed by the user
$this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause);
$access = is_array($this->pageinfo) ? 1 : 0;
					
if (($this->id && $access) || ($BE_USER->user['admin'] && !$this->id))	{

.. additional code

}
else {
// If no access or if ID == zero
$this->doc = t3lib_div::makeInstance('mediumDoc');
$this->doc->backPath = $BACK_PATH;

$this->content.=$this->doc->startPage($LANG->getLL('title'));
$this->content.=$this->doc->header($LANG->getLL('title'));
$this->content.=$this->doc->spacer(5);
$this->content.=$this->doc->spacer(10);
}


When I echo out these lines for a non-admin user I get the following:

$this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause);  	<-- non-admin EMPTY, Admin user has this [_thePath] => /

$access	 <-- non-admin EMPTY, Admin user has 1

$BE_USER->user['admin']  	<-- non-admin 0 , Admin user has 1

$this->id 		<-- non-admin user 0, Admin users has 0


Again, do you guys have any suggestions as to where I can look further in this issue of non-admin users not being able to see content of the module. They only see the title. I feel like I have exhausted my search. Any kind of information. Is it something that isn't configured right in the User Admin module? 

Thanks in advance,

Jason Alexander




On Jan 29, 2010, at 5:33 PM, Andreas Wagner wrote:

> Jason Alexander wrote:
>> Hello All,
>> Now this issue has been discussed here: http://lists.typo3.org/pipermail/typo3-english/2009-February/057821.html but there was no resolution of the issue. So let me try and explain my issue. I have built a few backend modules with the Kickstarter extension and they are viewable just fine for admin users. But for any other BE user, when you click on the module from the left hand side. The module page title shows up. But the rest of the page is blank. The previous discussion did say to look at the index.php file and search for the word "access" and to check BE users explicit permissions to access these modules. The access permission are setup properly and tested and the lines of code related to the word "access" in the index.php match other known modules that work. Here are some code snippets from my index.php that are related to the word "access"
> 
> Hi Jason,
> 
> I have no idea if this is of any help, but a while a go I had a similar problem, but this was after posting a form in the module. It worked perfectly well when logged in as an admin, but as a regular user, after posting the form, only the module header showed up.
> It turned out I had wrapped the form fields in an additional form tag, which is invalid because the page is already wrapped in a form tag by the module workings.
> 
> After removing the "<form>" and "</form>" from the module output, everything worked as expected.
> 
> Probably not the solution to your problem, but anyways ...
> 
> /Andreas
> _______________________________________________
> TYPO3-dev mailing list
> TYPO3-dev at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-dev





More information about the TYPO3-dev mailing list