Skip to content

Commit

Permalink
fix the BUGfix the BUG
Browse files Browse the repository at this point in the history
http://forum.joomla.org/viewtopic.php?f=579&t=725049

Missing 'administrator' part in the form's action page of the admin login. The form's action has value '/ index.php' instead of 'administrator / index.php'.
description For my new site, I want to put Joomla in excellant own sub-directory but hide the directory name in the URL. I Followed the online instructions and everything was working well except for the admin page. The problem is That the login form's action is missing the 'administrator' part in the path. Hence I keep getting 404 error because the page tries to load from the main site's index page.fix the BUG
Missing 'administrator' part in the form's action page of the admin login. The form's action has value '/ index.php' instead of 'administrator / index.php'.


Signed-off-by: Ufbamata26 <paty1.melo@gmail.com>
  • Loading branch information
paty1melo committed Jun 23, 2012
1 parent 0e4ef44 commit 3f99a1d
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 10 deletions.
14 changes: 7 additions & 7 deletions includes/defines.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@

define('JPATH_SITE', JPATH_ROOT);
define('JPATH_CONFIGURATION', JPATH_ROOT);
define('JPATH_ADMINISTRATOR', JPATH_ROOT . '/administrator');
define('JPATH_LIBRARIES', JPATH_ROOT . '/libraries');
define('JPATH_PLUGINS', JPATH_ROOT . '/plugins' );
define('JPATH_INSTALLATION', JPATH_ROOT . '/installation');
define('JPATH_THEMES', JPATH_BASE . '/templates');
define('JPATH_CACHE', JPATH_BASE . '/cache');
define('JPATH_MANIFESTS', JPATH_ADMINISTRATOR . '/manifests');
define('JPATH_ADMINISTRATOR', JPATH_ROOT . '\administrator');
define('JPATH_LIBRARIES', JPATH_ROOT . '\libraries');
define('JPATH_PLUGINS', JPATH_ROOT . '\plugins' );
define('JPATH_INSTALLATION', JPATH_ROOT . '\installation');
define('JPATH_THEMES', JPATH_BASE . '\templates');
define('JPATH_CACHE', JPATH_BASE . '\cache');
define('JPATH_MANIFESTS', JPATH_ADMINISTRATOR . '\manifests');
2 changes: 1 addition & 1 deletion libraries/joomla/environment/uri.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ public static function base($pathonly = false)
self::$base['prefix'] = $uri->toString(array('scheme', 'host', 'port'));
self::$base['path'] = rtrim($uri->toString(array('path')), '/\\');

if (JPATH_BASE == JPATH_ADMINISTRATOR)
if (JPATH_BASE."/administrator" == JPATH_ADMINISTRATOR)
{
self::$base['path'] .= '/administrator';
}
Expand Down
14 changes: 12 additions & 2 deletions modules/mod_login/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,21 @@
* @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
//define('_JEXEC', 1);
//define('DS', DIRECTORY_SEPARATOR);

if (!defined('_JDEFINES')) {
//define('JPATH_BASE', dirname(__FILE__));
require_once JPATH_BASE.'/includes/defines.php';
}

// no direct access
defined('_JEXEC') or die;
JHtml::_('behavior.keepalive');
?>
<?php if ($type == 'logout') : ?>
<?php

if ($type == 'logout') : ?>
<form action="<?php echo JRoute::_('index.php', true, $params->get('usesecure')); ?>" method="post" id="login-form">
<?php if ($params->get('greeting')) : ?>
<div class="login-greeting">
Expand All @@ -30,7 +39,8 @@
</div>
</form>
<?php else : ?>
<form action="<?php echo JRoute::_('index.php', true, $params->get('usesecure')); ?>" method="post" id="login-form" >
<form action="<?php echo JRoute::_('.'.'/administrator/index.php', true, $params->get('usesecure')); ?>" method="post" id="login-form" >

<?php if ($params->get('pretext')): ?>
<div class="pretext">
<p><?php echo $params->get('pretext'); ?></p>
Expand Down

0 comments on commit 3f99a1d

Please sign in to comment.