views:

824

answers:

2

Problem: My articles have the right urls: for example, newsite.com/article. However, by clicking an article I get an empty article. I can see my sidebar.

I moved my Joomla installation to a different folder in my server. I want to change my domain from OldSite.com to NewSite.com.

I am not sure whether I need to change the database or not too.

My recent configuration.php at NewSite.com which was moved from OldSite.com.

<?php
class JConfig {
var $offline = '1';
var $editor = 'jce';
var $list_limit = '20';
var $helpurl = 'http://help.joomla.org';
var $debug = '0';
var $debug_lang = '0';
var $sef = '1';
var $sef_rewrite = '1';
var $sef_suffix = '0';
var $feed_limit = '10';
var $secret = '----------------';
var $gzip = '0';
var $error_reporting = '7';
var $xmlrpc_server = '0';
var $log_path = '/home/masi/public_html/NewSite/logs';        // I added this
var $tmp_path = '/home/masi/public_html/NewSite/tmp';         // I added this
var $live_site = 'http://www.NewSite.com/';                   // I added this
var $offset = '0';
var $caching = '0';
var $cachetime = '15';
var $cache_handler = 'file';
var $memcache_settings = array();
var $ftp_enable = '0';
var $ftp_host = '127.0.0.1';
var $ftp_port = '21';
var $ftp_user = 'admin';
var $ftp_pass = '------------';              // hidden now for security
var $ftp_root = '';
var $dbtype = 'mysql';
var $host = 'localhost';
var $user = 'masi_jml02';                   
var $db = 'masi_jml02';                      
var $dbprefix = '';
var $mailer = 'mail';
var $mailfrom = '[email protected]';          
var $fromname = '';
var $sendmail = '/usr/sbin/sendmail';
var $smtpauth = '1';
var $smtpuser = '';
var $smtppass = '';
var $smtphost = 'localhost';
var $MetaAuthor = '0';
var $MetaTitle = '1';
var $lifetime = '15';
var $session_handler = 'database';
var $password = '--------------';                   // hidden now for security
var $sitename = '--------------';                   // hidden now for security
var $MetaDesc = '';
var $MetaKeys = '';
var $offline_message = 'This site is down for maintenance. Please check back again soon.';
}
?>

I put comments to the above code to indicates rows which I changed after I moved the installation folder.

My index.php at public_html/NewSite/templates/Theme/

<?php

// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" >
<head>
<jdoc:include type="head" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/system/css/system.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $this->baseurl;?>/templates/system/css/general.css" type="text/css" />

<link rel="stylesheet" href="<?php echo $this->baseurl;?>/templates/<?php echo $this->template ?>/css/customize.css" type="text/css" />


<script type="text/javascript" src="<?php echo $this->baseurl;?>/templates/<?php echo $this->template ?>/js/global.js"></script>
<?php if($this->countModules('left') <= 0 ) : ?>

<?php endif; ?>
<?php $div_wrap = ($this->countModules('left')) ? 'modulewrap' : 'modulewrap_wide'; ?>
<?php $div_right = ($this->countModules('user4')) ? 'right' : 'right_wide'; ?>
<?php $div_left = ($this->countModules('right')) ? 'left' : 'left_wide'; ?>
</head><body>
<div id="outerwrap">

  <div id="header">

    <?php if($this->countModules('user1')) : ?>
    <jdoc:include type="modules" name="user1" style="xhtml" />
    <?php else: ?>
    <h1><a href="<?php echo $mainframe->getCfg('live_site');?>" title="<?php echo $mainframe->getCfg('sitename');?>"><?php echo $mainframe->getCfg('sitename');?></a></h1>
    <?php endif; ?>

  </div>

<!-- 3bar column -->
      <?php if ($this->countModules('top')): ?>
      <div id="top">
      <jdoc:include type="modules" name="top" style="xhtml" />
      </div>
      <?php endif; ?>
<!-- End 3bar column -->
  <div class="clear"></div>
  <div id="wrapper">


  <!-- Start leftcol -->
    <?php if($this->countModules('left')) : ?>
    <div id="leftcol">
      <jdoc:include type="modules" name="left" style="xhtml" />
    </div>
    <!-- END leftcol -->
    <?php endif; ?>

<!-- Right column -->
      <?php if ($this->countModules('user3')): ?>
      <div id="user3">
      <jdoc:include type="modules" name="user3" style="xhtml" />
      </div>
      <?php endif; ?>
<!-- End Right column -->

    <div id="mainbody">
      <div class="inside">
        <jdoc:include type="message" />
        <jdoc:include type="component" />
</div>
      <!-- END INSIDE -->
    </div>
    <!-- END MAINBODY -->


      <div class="clear"></div>
    </div>
    <!--END WRAP-->
  </div>
  <!--END WRAPPER-->
  <div class="clear"></div>
  <div id="bottombar"></div>
</div>
<!--END OUTERWRAP-->

<div class="designer">
<jdoc:include type="modules" name="footer" style="raw" /></div>


</body>
</html>
+2  A: 

ok...

  • you moved the whole installation to a new directory? subdirectory?
  • what do you mean by 'not open correctly'? please provide error messages or a link!
  • you adjusted the configuration.php!? can you post it here (take passwords out)
  • it definitely works without doing anything in the database.
  • are you sure the changes in the configuration.php have taken effect. for example file was not writable or you edited it offline and forgot to upload it...
  • did you meddle with the index.php of your template? maybe the url is hard-coded somewhere?
  • is there another component/module/plugin which needs readjustement/reconfiguration?
tharkun
@tharkun: I added my recent configuration.php.
Masi
and this new domain is activated and set up?
tharkun
can you post your index.php
tharkun
@thankur: The new domain is activated and set up. I can see it in the browser. Articles just do not open correctly.
Masi
what do you mean by 'not correctly? what exactly doesn't work?
tharkun
I meant the index.php of your template
tharkun
I need to see the index.php of your template
tharkun
@tharkun: I pasted the index.php. I use the components MyBlog and JomComments. I will take a look if they cause some conflicts.
Masi
no, you didn't paste the index.php of your template... you pasted the index.php of joomla. I don't need to see that, that looks always the same. I need to see the index.php of your TEMPLATE.
tharkun
if you use myBlog, then see if in the config of MyBlog you have to change the url!
tharkun
@tharkun: The index.php which I pasted secondly locates at [~/public_html/NewSite/templates/blog/index.php]. I think that it is the index.php -file.
Masi
yes, there was a mixup with the edits. I rolled back now.
tharkun
ok, there is nothing wrong in your template. I assume the problem lies somewhere with the additional components.
tharkun
@tharkun: I removed 3 components such as xmap, and JoomlaXplorer. The following is a list of my current components http://dl.getdropbox.com/u/175564/Joomlacomponents.png. The same problem occurs still.
Masi
I said confusingly by accident that my articles open at the "wrong" url. They have the "right" urls, but by clicking an article I get an empty page.
Masi
look, I can't help you further like that. either you let me have a look at your joomla back- and frontend or you ask your question in the joomla forum where I would also ask you to give me access. if you want me to help you, create a temporary admin account and PM me on the joomla forum (tharkun).
tharkun
@tharkun: I PMed you at Joomla.org.
Masi
The problem is now solved. I will post the answer.
Masi
@tharkun: Thank you for your help!
Masi
A: 

My site was configured to use mod_rewrite but there was no .htaccess file available.

I disabled the mod_rewrite, and the links now work.

Masi