Zum Inhalt springen

Login mal wieder....

Erstellt am 12. März 2004 · 2 Antworten · letzte Antwort am 15. März 2004

Tags: Frage

cooper ·

Mein Pagetree sieht wie folgt aus:

-root
--home (2)
--produkte (3)
----basic (11)
----prof (10)
----special (9) <- nur für User der Gruppe FEUSER
--service (4)
--kontakt (5)
--anmelden (12)
--user (8)
--storage (15)

in der Seite Anmelden (12) ist die New Login Box eingebaut und wird auch auf jeder Seite angezeigt.

Der Ordner User (8-) enhält einmal die Benutzergruppe FEUSER und einen Benutzer TEST. Dieser Benutzer ist in der Grupper FEUSER.

Seite 15 hab ich angelegt wie es hier im Forum vorgeschlagen wurde. Typ ist Advanced und General Record Storage page ist die Seite die die Benutzergruppe/Benutzer enthält (User (8-)).

Im Setup ist die Searchbox wie folgt konfiguriert:

temp.10 = TEXT
temp.10.data  = TSFE : id
temp.10.wrap (
<table width="261" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="261" height="26" class="sidebartop">Login</td>
</tr>
</table>
<table width="261" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="261" class="sidebarcon">
<form action="index.php?id=8" method="post">
<input name="user" type="text" id="user" title="Benutzername" onfocus="if (this.value==this.defaultValue) this.value=''" value="Name" style="height:20; width:98; background-color:#FFFFFF; border:solid 1px #A0A0A0; font-size:10px;" />
<input name="pass" type="password" id="pass" title="Passwort" onfocus="if (this.value==this.defaultValue) this.value=''" value="Passwort" style="height:20; width:98; background-color:#FFFFFF; border:solid 1px #A0A0A0; font-size:10px;" >
<input name="image" type="image" title="Anmelden" src="fileadmin/8dev/images/login.gif" alt="Login" align="absbottom" style="border:0;width:14px; height:20px" border="0"> </td>
<input type="hidden" name="redirect_url"  value="index.php?id=|" />
<input type="hidden" name="logintype" value="login" > <input type="hidden" name="pid" value="8" >
</form>
</td>
</tr>
</table>
<table width="261" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="261" height="6"><img src="fileadmin/8dev/images/sidebar_bottom.gif" alt="" width="261" height="6" border="0"></td>
</tr>
</table>

Hier verweist die form action und die pid auf die Seite mit der ID 8.

In dieser Konfiguration kann sich der User Test einloggen. Aber es wird keine Fehlerseite angezeigt, wenn die Name/Passwort Kombination falsch ist. Hat jemand eine Idee ... ?

Wenn ich die Searchbox so konfiguriere:

<table width="261" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="261" height="26" class="sidebartop">Login</td>
</tr>
</table>
<table width="261" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="261" class="sidebarcon">
<form action="index.php?id=12" method="post">
<input name="user" type="text" id="user" title="Benutzername" onfocus="if (this.value==this.defaultValue) this.value=''" value="Name" style="height:20; width:98; background-color:#FFFFFF; border:solid 1px #A0A0A0; font-size:10px;" />
<input name="pass" type="password" id="pass" title="Passwort" onfocus="if (this.value==this.defaultValue) this.value=''" value="Passwort" style="height:20; width:98; background-color:#FFFFFF; border:solid 1px #A0A0A0; font-size:10px;" >
<input name="image" type="image" title="Anmelden" src="fileadmin/8dev/images/login.gif" alt="Login" align="absbottom" style="border:0;width:14px; height:20px" border="0"> </td>
<input type="hidden" name="redirect_url"  value="index.php?id=|" />
<input type="hidden" name="logintype" value="login" > <input type="hidden" name="pid" value="8" >
</form>
</td>
</tr>
</table>
<table width="261" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="261" height="6"><img src="fileadmin/8dev/images/sidebar_bottom.gif" alt="" width="261" height="6" border="0"></td>
</tr>
</table>

Hier verweist die form action auf die ID 12 und die pid auf die Seite mit der ID 8.

Kommt zwar die Meldung das Name oder Passwort falsch sind, aber wenn die richtigen Daten angegeben werden bekomm ich nur eine Fehlermeldung zurück:

Warning: Cannot add header information - headers already sent by (output started at /homepages/xx/xxxxxxx/htdocs/tslib/class.tslib_pibase.php:1) in /homepages/xx/xxxxxxx/htdocs/typo3conf/ext/newloginbox/pi1/class.tx_newloginbox_pi1.php on line 149

Irgendwie muss es dazu eine Lösung geben, da ich das Setup der Seite von hier (#8010) übernommen hab.

cooper ·

Also der Login treibt mich noch in den Wahnsinn...

Ich habe es mittlerweile hinbekommen das man sich einloggen kann. Aber sobald ich bei <input type="hidden" name="redirect_url" value=""> beispielsweise index.php?id=| oder benutzer.|.0.html eingebe bekomme ich nach dem login diese Fehlermeldung serviert:

Warning: Cannot add header information - headers already sent by (output started at /homepages/xx/xxxxxx/htdocs/tslib/class.tslib_pibase.php:1) in /homepages/x/xxxxxx/htdocs/typo3conf/ext/newloginbox/pi1/class.tx_newloginbox_pi1.php on line 149

Hier nochmal mein aktuelles Setup:

[usergroup = *]
# Logout
temp.10 = TEXT
temp.10.data  = TSFE : id
temp.10.wrap ( 
<table width="261" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="261" height="26" class="sidebartop">Login</td>
</tr>
</table>
<table width="261" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="261" class="sidebarcon" align="center">Sie sind eingeloggt als <b><!--###USERNAME###--></b>.<br>
<form action="index.php?id= | " method="post">
<input type="hidden" name="logintype" value="logout" >
<input type="submit" name="submit" title="Abmelden" value="Abmelden" style="height:20; width:130; background-color:#FFFFFF; border:solid 1px #A0A0A0; font-size:12px;">
</form>
</td>
</tr>
</table>
<table width="261" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="261" height="6"><img src="fileadmin/8dev/images/sidebar_bottom.gif" alt="" width="261" height="6" border="0"></td>
</tr>
</table>
)
[else]
# Login
temp.10 = TEXT
temp.10.data  = TSFE : id

temp.10.wrap (
<table width="261" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="261" height="26" class="sidebartop">Login</td>
</tr>
</table>
<table width="261" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="261" class="sidebarcon">
<form action="anmelden.12.0.html" method="post">
<input name="user" type="text" id="user" title="Benutzername" onfocus="if (this.value==this.defaultValue) this.value=''" value="test" style="height:20; width:97; background-color:#FFFFFF; border:solid 1px #A0A0A0; font-size:12px;" />
<input name="pass" type="password" id="pass" title="Passwort" onfocus="if (this.value==this.defaultValue) this.value=''" value="test" style="height:20; width:98; background-color:#FFFFFF; border:solid 1px #A0A0A0; font-size:12px;" >
<input name="image" type="image" title="Anmelden" src="fileadmin/test/images/login.gif" style="border:solid 0px;" alt="Login" align="absbottom" width="14" height="20" border="0"> </td>
<input type="hidden" name="redirect_url" value="benutzer.|.0.html">
<input type="hidden" name="logintype" value="login" > <input type="hidden" name="pid" value="8" >
</form>
</td>
</tr>
</table>
<table width="261" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="261" height="6"><img src="fileadmin/8dev/images/sidebar_bottom.gif" alt="" width="261" height="6" border="0"></td>
</tr>
</table>
)
[global]

Der Fehler tritt auch auf wenn ich die redirect URL hart kodiere. Lass ich die redirect URL leer, kann ich mich zwar einloggen aber unter dem Formular wird immer die ID der Seite im Quelltext ausgegeben. Ich brauche aber den redirect Parameter weil ich das dkd_redirect_at_login Plugin benutzen muss.

Wie immer... bin für jeden Tipp dankbar...

PS: Ich sollte noch dazusagen, dass der Fehler nur auftritt, wenn ich das Anmeldeformular benutze das rechts auf jeder Seite sichtbar ist auftritt. Benutze ich das Formular das über Pagecontent in die Seite eingefügt ist. funktionierts.