blank page to login in frontend

General questions relating to Joomla! 2.5. Note: All 1.6 and 1.7 releases have reached end of life and should be updated to 2.5. There are other boards for more specific help on Joomla! features and extensions.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Locked
fabjo06
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Tue Dec 03, 2013 8:20 am

blank page to login in frontend

Post by fabjo06 » Tue Dec 03, 2013 10:32 am

Hi
First of all, sorry for my bad English :

- url rewriting is on (3 first parameters in site/configuration/SEO parameters)
- Progressive caching is on

If the cache is cleared, in Frontend, i want to login : blank page with no tags in Firefox or Chrome (in IE : 500 error message)...
I refresh the page, and login page appears, so I can login (the same way to load the page with aicontactsafe to send an email)

I try to deactivate caching with SEO activated : no blank page
and to deactivate SEO with caching activated : no blank page

The blank page exists when caching and SEO are activated and, caching is cleared (only for the login page and the page to send an email).
After one page refresh, all is ok.

I search where this problem comes from, and i found these articles :
- http://developernote.com/2012/05/how-to ... oomla-2-5/
- http://forum.joomla.org/viewtopic.php?f=618&p=3070371

->
The solution is that you will need to open components\com_content\router.php in an editor and make a few small changes (be sure to backup router.php):

in function ContentBuildRoute(&$query) go to line 27 and change "0" to "1"

27:

Code: Select all

$advanced    = $params->get('sef_advanced_link', 0);
with
27:

Code: Select all

$advanced    = $params->get('sef_advanced_link', 1);
in function ContentParseRoute($segments) go to line 208 and change "0" to "1"

208:

Code: Select all

$advanced    = $params->get('sef_advanced_link', 0);
with
208:

Code: Select all

$advanced    = $params->get('sef_advanced_link', 1);
Then you will need to comment out lines 228-232
228
229
230
231
232

Code: Select all

if (strpos($segments[0], ':') === false) {
    $vars['view'] = 'article';
    $vars['id'] = (int)$segments[0];
    return $vars;
}
so it would be changed to

Code: Select all

/*
if (strpos($segments[0], ':') === false) {
    $vars['view'] = 'article';
    $vars['id'] = (int)$segments[0];
    return $vars;
}*/
I try it, but no success.
There is this line : "$advanced = $params->get('sef_advanced_link', 0);"
The parameter "sef advanced mode" doesn't exist in "Article Manager" because in the Core file "administrator/components/com_content/config.xml"

Code: Select all

<field name="sef_advanced_link"
    type="radio"
    default="0"
    label="Sef Advanced Mode"
    description="Remove ItemID from Content URL?">
        <option    value="0">JNO</option>
        <option    value="1">JYES</option>
</field>
doesn't exist.

Is it normal ? Because i found a Joomla error message which explained that "sef_advanced_link" parameter doesn't exist anymore.
So, I replaced lines 27 and 208 by this one

Code: Select all

$advanced = 0;
(the default value).....No blank page ! Just this error message "Error loading component: com_content, 1". So now, after clearing the cache, i can access to my login or emailing page (and my iCaptcha mathguard can be refreshed, before it doesn't), but with this error message.
(I tried with 0 and 1 parameter, and comment/uncomment line 228 to 232)
Note also: This error message only exists when I load Login/Email page for the first time. After all is right if I don't clear the cache.

What's wrong ?
The Core code of router.php and config.xml is right ?

Thank a lot.

itoctopus
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4025
Joined: Mon Nov 25, 2013 4:35 pm
Location: Montreal, Canada
Contact:

Re: blank page to login in frontend

Post by itoctopus » Tue Dec 03, 2013 3:20 pm

The order of the plugins matters. Ensure that your cache plugin's ordering is the last, and that your Joomla SEF plugin's ordering is before last. This should solve the problem.
http://www.itoctopus.com - Joomla consulting at its finest
https://twitter.com/itoctopus - Follow us on Twitter

fabjo06
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Tue Dec 03, 2013 8:20 am

Re: blank page to login in frontend

Post by fabjo06 » Tue Dec 03, 2013 7:13 pm

Thank you for your reply !
I ordered the cache plugin to the last position and the joomla SEF before it.
I tested with the native router.php, but no lucky...it's the same result.
The links to login and to send email show a blank page.
Without the cache, it's OK.

And with or without caching, in debug mode, there is this message :
JDatabaseMySQL::query: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 SQL=SELECT xxxxx_categories.title FROM xxxxx_content, xxxxx_categories WHERE xxxxx_content.catid = xxxxx_categories.id AND xxxxx_content.id =
The error comes from MySQL data base ?


If I modify router.php with "$advanced = 1;" (I don't want urls with item id, and I have not looked at how to do it with htaccess), and comment line 228 to 232, login and email links appeared but with this error message "Error loading component: com_content, 1".

So, I am too disappointed to let's the caching deactivated for the moment....

In the router.php, lines 27, 208 and 228 to 232 are very important ?
The blank page for the login link and the email link exists with

Code: Select all

$params->get('sef_advanced_link', 0);
.

Note also:
I updated joomla 2.5.9 to 2.5.16 last week. The blank page existed before and if i wanted to use caching, I just had to refresh the page one time.

Another problem occured : articles with an alias containing a single word (without dashes) have lost their link (404 error). If I comment line 228 to 232 of router.php, it works again (Before the update, it was ok).

fabjo06
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Tue Dec 03, 2013 8:20 am

Re: blank page to login in frontend

Post by fabjo06 » Wed Dec 11, 2013 11:39 am

I found where is the problem : in a plugin !
I don't know why, but there were these lines that I didn't need :

Code: Select all

$db = JFactory::getDBO();
		$id = JRequest::getString('id'); 
		$db->setQuery('SELECT #__categories.title FROM #__content, #__categories WHERE #__content.catid = #__categories.id AND #__content.id = '.$id); 
		$category = $db->loadResult();
and now , no blank page for my login link and mail form link.


Locked

Return to “General Questions/New to Joomla! 2.5”