Pages not found after moving site Topic is solved

Need help installing Joomla! 3.x? For all Joomla! 3.x installation issues please use this forum.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Post Reply
ByterBit44
Joomla! Apprentice
Joomla! Apprentice
Posts: 18
Joined: Thu Oct 19, 2023 11:25 pm

Pages not found after moving site

Post by ByterBit44 » Wed Oct 25, 2023 12:54 pm

I copied a working site to a local windows machine for testing and development.
I now get the dreaded:
The requested page can't be found.
An error has occurred while processing your request.

You may not be able to visit this page because of:

an out-of-date bookmark/favourite
a mistyped address
I've played with .htaccess to no avail.

I'm running the site from this url, which may be the cause of the problem?
http://127.0.0.1/xxxxx/public_html/

I also can't log in as admin from here:

http://127.0.0.1/xxxxx/public_html/administrator/
although I do get a badly formed page and text boxes for user and password


Many thanks for any help!

gws
Joomla! Champion
Joomla! Champion
Posts: 5952
Joined: Tue Aug 23, 2005 1:56 pm
Location: South coast, UK
Contact:

Re: Pages not found after moving site

Post by gws » Wed Oct 25, 2023 1:48 pm

Normally the url for local site would be 127.0.0.1/public_html/xxx/
working sites are often https: if you just copied the site then in global config you need to change that.

ByterBit44
Joomla! Apprentice
Joomla! Apprentice
Posts: 18
Joined: Thu Oct 19, 2023 11:25 pm

Re: Pages not found after moving site

Post by ByterBit44 » Wed Oct 25, 2023 11:46 pm

I moved the public_html folder to the root of this local web sever.
No luck.
I did manage to manually turn on error reporting (I'm learning, but slowly)
I'm given more information I cant yet use, and I'm asked to contact the sys admin.

Sadly, I am the System Administrator :>)


**If difficulties persist, please contact the System Administrator of this site and report the error below.**


404 **Category not found**
C:\wamp\www\public_html\libraries\legacy\error\error.php:200
Call stack
# Function Location
1 () JROOT\libraries\legacy\error\error.php:200
2 JError::raise() JROOT\libraries\legacy\error\error.php:277
3 JError::raiseError() JROOT\libraries\src\MVC\View\CategoryView.php:133
4 Joomla\CMS\MVC\View\CategoryView->commonCategoryDisplay() JROOT\components\com_content\views\category\view.html.php:75
5 ContentViewCategory->display() JROOT\libraries\src\MVC\Controller\BaseController.php:672
6 Joomla\CMS\MVC\Controller\BaseController->display() JROOT\components\com_content\controller.php:118
7 ContentController->display() JROOT\libraries\src\MVC\Controller\BaseController.php:710
8 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT\components\com_content\content.php:43
9 require_once() JROOT\libraries\src\Component\ComponentHelper.php:402
10 Joomla\CMS\Component\ComponentHelper::executeComponent() JROOT\libraries\src\Component\ComponentHelper.php:377
11 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT\libraries\src\Application\SiteApplication.php:194
12 Joomla\CMS\Application\SiteApplication->dispatch() JROOT\libraries\src\Application\SiteApplication.php:233
13 Joomla\CMS\Application\SiteApplication->doExecute() JROOT\libraries\src\Application\CMSApplication.php:196
14 Joomla\CMS\Application\CMSApplication->execute() JROOT\index.php:49

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 17445
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: Pages not found after moving site

Post by toivo » Thu Oct 26, 2023 3:29 am

ByterBit44 wrote:
Wed Oct 25, 2023 11:46 pm
3 JError::raiseError() JROOT\libraries\src\MVC\View\CategoryView.php:133
These lines in the file libraries/src/MVC/View/CategoryView.php report the error message:

Code: Select all

		if ($parent == false)
		{
			return \JError::raiseError(404, \JText::_('JGLOBAL_CATEGORY_NOT_FOUND'));
		}
In other words, the category that triggers the error does not have a parent category.

Use phpMyAdmin and browse the table _categories. The column 'id' of the first row is 1, both asset_id and parent_id are 0. The column 'parent_id' of the rest of the category rows would be 1, pointing to the ROOT category, unless the website uses a multi-level category structure.

Does the list of categories have more than one category where the column parent_id is 0 or blank?

Go to Content - Categories. There should be button at the top to rebuild the category tree. Click that and see if that fixes the issue.
Toivo Talikka, Global Moderator

cps31
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Fri Mar 15, 2013 10:11 am
Location: United Kingdom
Contact:

Re: Pages not found after moving site

Post by cps31 » Thu Oct 26, 2023 4:59 am

Verify that every database table in your system is current and accurate. To accomplish this, navigate to the Joomla backend's Components > Joomla! Update > Database menu.

User avatar
ManuelVoileux
Joomla! Intern
Joomla! Intern
Posts: 70
Joined: Sun Nov 24, 2013 8:24 am
Location: France
Contact:

Re: Pages not found after moving site

Post by ManuelVoileux » Thu Oct 26, 2023 9:08 am

ByterBit44 wrote:
Wed Oct 25, 2023 12:54 pm
I copied a working site to a local windows machine for testing and development....
Hi , you say that you have copied a working site. What operation have you done exactly ?

Transfer a site from an online server file by file with FTP ? then run a local Apache server and launch your site on localhost ?

On a Windows PC, copy files locally , from from one folder to another ? and run a local Apache server and launch your site on localhost ?

In order to save the database, and the files, I would recommend to make a full backup of the working site with Akeeba backup. Then transfer (FTP) this archive file mybackup.jpa to your local PC. Copy the .jpa file , and kickstart.php (from Akeeba as well) in the new root folder.

Launch your local Apache server, and install your site : localhost/new_root_folder/kickstart.php
the syntax may change according the local Apache server that you use. Wamp, Xamp etc.

Then launch your site at the end of the process. If you get a 500 error, fist check the config.php in the root folder, and adjust the "public $cache_path" and "public $tmp_path "

Please excuse if I am stating the obvious.

ByterBit44
Joomla! Apprentice
Joomla! Apprentice
Posts: 18
Joined: Thu Oct 19, 2023 11:25 pm

Re: Pages not found after moving site

Post by ByterBit44 » Fri Oct 27, 2023 10:22 pm

Thank you all for your kind support!

Toivo:

To your question:

“Does the list of categories have more than one category where the column parent_id is 0 or blank?”

No

To your suggestion :
“Go to Content - Categories. There should be button at the top to rebuild the category tree”

I can’t get there in any event. I can’t get Administration to run.
Inspect/console shows files not being found. The paths to the files do look to be OK. The files are in fact there.


Cps31:

I can’t get Administration to run! I get a badly formed page with text boxes to enter user and PW, but they don’t work.
Again inspect/console shows files not being found. The paths however look OK.

Manuel:

Nothing you could say about Joomla will be obvious to me :>)


I moved the site down from a working system on a Linux box at “HostDime” (not my set up) via FTP.
I then moved the data by producing an SQL Export file from PHPMyAdmin.
I checked the imported data, running on my local Windows MYSQL server, and it looks ok.


In the local browser I get the header of the website, but then:

**The requested page can't be found.**

What may be interesting is that in Inspect /Console I’m told various files can’t be found.

For example

When I try to run
http://127.0.0.1/public_html/index.php

Code: Select all

 Failed to load resource: the server responded with a status of 404 (Not Found)
        
http://127.0.0.1/templates/sk8tboard/css/template.css       




http://127.0.0.1/public_html/administrator/index.php

console shows me:

Code: Select all

GET http://127.0.0.1/media/cms/css/debug.css?7722971… net::ERR_ABORTED 404 (Not Found)


Manuel, frankly I’m scared of installing Akeeba on the production machine. I’m worried about destabilizing a working system. I’m concerned that I don’t know Joomla well enough to deal with any issues that might happen.
Is this worry unreasonable? As a newbie I get the sense that I might easily break the Joomla system. Have you ever heard of the installation of 3’d party software being a problem?

gws
Joomla! Champion
Joomla! Champion
Posts: 5952
Joined: Tue Aug 23, 2005 1:56 pm
Location: South coast, UK
Contact:

Re: Pages not found after moving site

Post by gws » Fri Oct 27, 2023 10:42 pm

Akeeba is probably the most used 3rd party software on joomla. I have used it for many years without issues and on top of that the support is first rate.

User avatar
AMurray
Joomla! Exemplar
Joomla! Exemplar
Posts: 9747
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: Pages not found after moving site

Post by AMurray » Fri Oct 27, 2023 11:52 pm

Ok, your methodology for the site transfer was sound, you copied the files, you export from live site database /import to a local-host new database. Did you update configuration.php to specify the database on localhost? I assume so.

Does the $live_site variable have any value - if so that should be "null" as in $live_site = ''; (that's two single quotes followed by semi-colon).

That's my 2c at the moment for suggestions.
Regards - A Murray
General Support Moderator

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 44096
Joined: Sat Apr 05, 2008 9:58 pm

Re: Pages not found after moving site

Post by Webdongle » Fri Oct 27, 2023 11:59 pm

https://forumpostassistant.github.io/docs/ please
Also what localhost stack are you running?
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

ByterBit44
Joomla! Apprentice
Joomla! Apprentice
Posts: 18
Joined: Thu Oct 19, 2023 11:25 pm

Re: Pages not found after moving site

Post by ByterBit44 » Sun Oct 29, 2023 1:46 pm

Mr. Murray's suggestion of setting the $live_site variable to be "null"
proved to be the key to success here. Thank you!

I now get a fully loading page and site

Doubtless I've got more to learn of Joomla, but at least now I can run and experiment with the site.

Many many thanks to everyone!


Post Reply

Return to “Installation Joomla! 3.x”