<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Typo3: show login page for protected pages when user not is logged in</title>
	<atom:link href="http://blog.dev001.net/2009/10/typo3-show-login-page-for-protected-pages-when-user-not-is-logged-in/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.dev001.net/2009/10/typo3-show-login-page-for-protected-pages-when-user-not-is-logged-in/</link>
	<description>Just another Web Developer's weblog</description>
	<lastBuildDate>Thu, 01 Jul 2010 12:09:46 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Jörg Wagner</title>
		<link>http://blog.dev001.net/2009/10/typo3-show-login-page-for-protected-pages-when-user-not-is-logged-in/comment-page-1/#comment-2328</link>
		<dc:creator>Jörg Wagner</dc:creator>
		<pubDate>Thu, 01 Jul 2010 12:09:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dev001.net/?p=228#comment-2328</guid>
		<description>Very nice, Richard!

I just implemented your solution in a TYPO3 4.3.2 website using the felogin sysext for logins and I had to change some details to get it working:

1. As I don’t use RealURL or static URLs in this project, my LOGIN_URL contains an id parameter. So, as there is already a parameter in the URL any further params have to be appended using &amp; instead of ?.
This results in the following code change:
$url = LOGIN_URL.(strpos(LOGIN_URL, &#039;?&#039;)===false?&#039;?&#039;:&#039;&amp;&#039;).&quot;redirect_url=&quot;.$param[&quot;currentUrl&quot;];
Unfortunatelly this blog software heavily degrades the above code line. I hope you can figure it out as I dont know how to enter it so that is not corrupted. With a bit of PHP knowledge it should be obvious. Maybe Richard can correct it.

2. With felogin 1.3.0 in TYPO3 4.3.2 the redirect_url parameter is not correctly interpreted. This is a bug and it is corrected in TYPO3 4.4.0 (strange enough the sysext still has version 1.3.0 there!). To fix this problem in older versions of T3 do the following:
In...
/typo3/sysext/felogin/pi1/class.tx_felogin_pi1.php
change this line...
if (!$gpRedirectUrl &amp;&amp; $this-&gt;redirectUrl &amp;&amp; $this-&gt;logintype === ‘login’) {
to this...
if (!$gpRedirectUrl &amp;&amp; $this-&gt;redirectUrl) {
(delete the third condition entirely).

3. With felogin you have to  set the redirect mode in the plugin settings to &#039;defined by GET/POST-Vars&#039; to activate the interpretation of the redirect_url GET parameter. This also makes it possible to define the priority of different redirects.

Thanks again for your nice work!
Cheers, Jörg.</description>
		<content:encoded><![CDATA[<p>Very nice, Richard!</p>
<p>I just implemented your solution in a TYPO3 4.3.2 website using the felogin sysext for logins and I had to change some details to get it working:</p>
<p>1. As I don’t use RealURL or static URLs in this project, my LOGIN_URL contains an id parameter. So, as there is already a parameter in the URL any further params have to be appended using &amp; instead of ?.<br />
This results in the following code change:<br />
$url = LOGIN_URL.(strpos(LOGIN_URL, &#8216;?&#8217;)===false?&#8217;?&#8217;:&#8217;&amp;&#8217;).&#8221;redirect_url=&#8221;.$param[&#8220;currentUrl&#8221;];<br />
Unfortunatelly this blog software heavily degrades the above code line. I hope you can figure it out as I dont know how to enter it so that is not corrupted. With a bit of PHP knowledge it should be obvious. Maybe Richard can correct it.</p>
<p>2. With felogin 1.3.0 in TYPO3 4.3.2 the redirect_url parameter is not correctly interpreted. This is a bug and it is corrected in TYPO3 4.4.0 (strange enough the sysext still has version 1.3.0 there!). To fix this problem in older versions of T3 do the following:<br />
In&#8230;<br />
/typo3/sysext/felogin/pi1/class.tx_felogin_pi1.php<br />
change this line&#8230;<br />
if (!$gpRedirectUrl &amp;&amp; $this-&gt;redirectUrl &amp;&amp; $this-&gt;logintype === ‘login’) {<br />
to this&#8230;<br />
if (!$gpRedirectUrl &amp;&amp; $this-&gt;redirectUrl) {<br />
(delete the third condition entirely).</p>
<p>3. With felogin you have to  set the redirect mode in the plugin settings to &#8216;defined by GET/POST-Vars&#8217; to activate the interpretation of the redirect_url GET parameter. This also makes it possible to define the priority of different redirects.</p>
<p>Thanks again for your nice work!<br />
Cheers, Jörg.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jörg Wagner</title>
		<link>http://blog.dev001.net/2009/10/typo3-show-login-page-for-protected-pages-when-user-not-is-logged-in/comment-page-1/#comment-2327</link>
		<dc:creator>Jörg Wagner</dc:creator>
		<pubDate>Thu, 01 Jul 2010 11:39:14 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dev001.net/?p=228#comment-2327</guid>
		<description>Oh damn - I am really flooding this thread - everything in German in the last posting was not meant to be posted. Please ignore / delete...</description>
		<content:encoded><![CDATA[<p>Oh damn - I am really flooding this thread - everything in German in the last posting was not meant to be posted. Please ignore / delete&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jörg Wagner</title>
		<link>http://blog.dev001.net/2009/10/typo3-show-login-page-for-protected-pages-when-user-not-is-logged-in/comment-page-1/#comment-2326</link>
		<dc:creator>Jörg Wagner</dc:creator>
		<pubDate>Thu, 01 Jul 2010 11:38:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dev001.net/?p=228#comment-2326</guid>
		<description>Well, unfortunatelly this was not all.
The param &quot;referer&quot; is unfortunatelly also used when calling the login page from some other page in the website. In this case my posted solution will redirect after login back to the calling page, which is not at all desireable.
The final solution reverts back to redirect_url and I will send it in a separate posting, so Richard can delete all this intermediate stuff if he wishes. Here we go...
dann wird nach dem Login fälschlicherweise dorthin zurück gekehrt. Also zurück zu redirect_url. Wie bereits in meinem ersten Posting vermutet, gibt es hier in felogin 1.3.0 einen Bug. Dieser ist in TYPO3 4.4.0 behoben (die Sysext trägt dort aber komischerweise immer noch die Versionsnummer 1.3.0). Um ihn in älteren T3-Versionen zu beheben:
In 
/typo3/sysext/felogin/pi1/class.tx_felogin_pi1.php
die Zeile
if (!$gpRedirectUrl &amp;&amp; $this-&gt;redirectUrl &amp;&amp; $this-&gt;logintype === &#039;login&#039;) {
ändern in
if (!$gpRedirectUrl &amp;&amp; $this-&gt;redirectUrl) {
(also die dritte Condition löschen).</description>
		<content:encoded><![CDATA[<p>Well, unfortunatelly this was not all.<br />
The param &#8220;referer&#8221; is unfortunatelly also used when calling the login page from some other page in the website. In this case my posted solution will redirect after login back to the calling page, which is not at all desireable.<br />
The final solution reverts back to redirect_url and I will send it in a separate posting, so Richard can delete all this intermediate stuff if he wishes. Here we go&#8230;<br />
dann wird nach dem Login fälschlicherweise dorthin zurück gekehrt. Also zurück zu redirect_url. Wie bereits in meinem ersten Posting vermutet, gibt es hier in felogin 1.3.0 einen Bug. Dieser ist in TYPO3 4.4.0 behoben (die Sysext trägt dort aber komischerweise immer noch die Versionsnummer 1.3.0). Um ihn in älteren T3-Versionen zu beheben:<br />
In<br />
/typo3/sysext/felogin/pi1/class.tx_felogin_pi1.php<br />
die Zeile<br />
if (!$gpRedirectUrl &amp;&amp; $this-&gt;redirectUrl &amp;&amp; $this-&gt;logintype === &#8216;login&#8217;) {<br />
ändern in<br />
if (!$gpRedirectUrl &amp;&amp; $this-&gt;redirectUrl) {<br />
(also die dritte Condition löschen).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jörg Wagner</title>
		<link>http://blog.dev001.net/2009/10/typo3-show-login-page-for-protected-pages-when-user-not-is-logged-in/comment-page-1/#comment-2325</link>
		<dc:creator>Jörg Wagner</dc:creator>
		<pubDate>Thu, 01 Jul 2010 07:53:41 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dev001.net/?p=228#comment-2325</guid>
		<description>Hmmm. Wordpress heavily destroyed my code change line. I hope you can figure it out as I dont know how to enter it so that is not corrupted. With a bit of PHP knowledge it should be obvious. Maybe Richard can correct it.
Cheers, Jörg.</description>
		<content:encoded><![CDATA[<p>Hmmm. WordPress heavily destroyed my code change line. I hope you can figure it out as I dont know how to enter it so that is not corrupted. With a bit of PHP knowledge it should be obvious. Maybe Richard can correct it.<br />
Cheers, Jörg.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jörg Wagner</title>
		<link>http://blog.dev001.net/2009/10/typo3-show-login-page-for-protected-pages-when-user-not-is-logged-in/comment-page-1/#comment-2324</link>
		<dc:creator>Jörg Wagner</dc:creator>
		<pubDate>Thu, 01 Jul 2010 07:46:41 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dev001.net/?p=228#comment-2324</guid>
		<description>Very nice, Richard!

I just implemented your solution in a TYPO3 4.3.2 website using the felogin sysext for logins and I had to change some details to get it working:

1. As I don&#039;t use RealURL or static URLs in this project, my LOGIN_URL contains an id parameter. So, as there is already a parameter in the URL any further params have to be appended using &amp; instead of ? (see code change below).

2. With felogin 1.3.0 the redirect_url parameter is not correctly interpreted. I am quite sure that this is a bug, but did not investigate this route. The better solution is to use the referrer parameter and in the felogin plugin settings set the redirect mode to \defined by Referrer\. This also makes it possible to define the priority of different redirects. Together with the change in 1. this results in the following code change:
      $url = LOGIN_URL.(strpos(LOGIN_URL, &#039;?&#039;)===false?&#039;?&#039;:&#039;&amp;&#039;).\referer=\.$param[\currentUrl\];

3. VERY IMPORTANT: The current version 1.3.0 of felogin contains a bug which impedes the correct function of the referer param (see http://bugs.typo3.org/view.php?id=12990). To make it work you have to apply the latest patch in that bug report. It has been committed to trunk on 05/31/2010 so it will probably be part of the core in the next T3 versions.

Thanks again for your nice work!
Cheers, Jörg.</description>
		<content:encoded><![CDATA[<p>Very nice, Richard!</p>
<p>I just implemented your solution in a TYPO3 4.3.2 website using the felogin sysext for logins and I had to change some details to get it working:</p>
<p>1. As I don&#8217;t use RealURL or static URLs in this project, my LOGIN_URL contains an id parameter. So, as there is already a parameter in the URL any further params have to be appended using &amp; instead of ? (see code change below).</p>
<p>2. With felogin 1.3.0 the redirect_url parameter is not correctly interpreted. I am quite sure that this is a bug, but did not investigate this route. The better solution is to use the referrer parameter and in the felogin plugin settings set the redirect mode to \defined by Referrer&#46; This also makes it possible to define the priority of different redirects. Together with the change in 1. this results in the following code change:<br />
      $url = LOGIN_URL.(strpos(LOGIN_URL, &#8216;?&#8217;)===false?&#8217;?&#8217;:&#8217;&amp;&#8217;).\referer=&#46;$param[\currentUrl\];</p>
<p>3. VERY IMPORTANT: The current version 1.3.0 of felogin contains a bug which impedes the correct function of the referer param (see <a href="http://bugs.typo3.org/view.php?id=12990)" rel="nofollow">http://bugs.typo3.org/view.php?id=12990)</a>. To make it work you have to apply the latest patch in that bug report. It has been committed to trunk on 05/31/2010 so it will probably be part of the core in the next T3 versions.</p>
<p>Thanks again for your nice work!<br />
Cheers, Jörg.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
