Copy TYPO3 to a new domain - typo3

I try to copy a TYPO3 installtion to a new directory (and new domain), but got some problems I can't figure out where they come from.
What I have done is: I copied all the files to the new directory (New domain is mapped to this directory). I copied the database. I changed the DB Logininfos in typo3conf/LocalConfiguration.php.
When I call the new domain now I get Oops, an error occurred!. So far so good (I will have to change the domains in the backend else it can't work).
When I want to login in the backend (/typo3) I get the login-mask, but without any CSS or images. I also can't login, it says user or passwort is wrong. I changed the admin-password in the new database but still can't login.
I am not sure what I can do now or how I can debug whats wrong.
To the CSS and Images:
Both /typo3 Sites include the same CSS /typo3temp/compressor/merged-XXXX.css?xxxx. But the version on the copied version is muuch shorter.
Then the image
//Version on original:
<img src="sysext/t3skin/images/login/typo3logo-white-greyback.gif" alt="" class="t3-login-logo">
//Version on copied-version
<img src="../skin/images/login/typo3logo-white-greyback.gif" alt="" class="t3-login-logo">
Do I miss something? How could I find my error?

empty the typo3temp folder did the trick.

Related

Keystone, feature galleries on home page

I used yo keystone to generate a keystone webpage and basically what I want is to sort of feature galleries on the homepage. I added the line
view.query('galleries', keystone.list('Gallery').model.find().sort('sortOrder'));
to my index.js file in the routes/views folder and basically copied the gallery.jade file into index.jade so that I could make sure the page could find "galleries" but when i try to open the page, i get the error that "galleries" is undefined.
I have also tried adding this bit of code to the same index.js
locals.data = {
galleries: keystone.list('Gallery').model.find().sort('sortOrder');
};
and calling data.galleries in index.jade but it didn't work either.
How do I get this gallery list on my jade file?
Turns out that my original change with view.query was correct. I just needed to restart my database.

Friendly URLs - caching wrong route

I am using ASP.NET Friendly URLs with a C# asp.net 4.5.1 website on a Windows 2012 Server with IIS implementation.
(this simply and automatically converts aspx pages into nice URLs - eg mydomain.com/mypage.aspx - into mydomain.com/mypage). If a page isn't found the site then falls back to looking for routes. My RouteConfig.cs looks like this...
var settings = new FriendlyUrlSettings();
settings.AutoRedirectMode = RedirectMode.Permanent;
// Firstly Friendly URL's are enabled
routes.EnableFriendlyUrls(settings);
routes.Ignore("{resource}.axd/{*pathInfo}");
// Now a regular root is looked for
routes.MapPageRoute("route1", "{myroute}/{myroutename}", "~/routepage.aspx");
I tried accessing mydomain/testpage when testpage.aspx DIDNT exist. It routed to mydomain.com/thispage.
I then created testpage.aspx - but now if I try and access mydomain/testpage it still goes to the old route like the page doesn't exist. I've tried restarting the website in IIS, reuploading the RouteConfig.cs file - it still routes wrong.
I've tested on multiple browsers (Chrome & FF on Mac) - all fail. I've tried typing mydomain/testpage.aspx - still routes wrong.
I created a new subdomain for testing - and the page works fine in that.
It's like it's cached somewhere. How can I 'force a refresh' - ie get the newly uploaded page to work?
thanks
Ensure you are uploading the bin folder - this fixed it.

Zend Framework deployment to a subdomain

I am using Zend Framework to develop some application. I develop on my localhost and then I upload it to some subdomain like abc.mydomain.com. When I upload my layout index.phtml, I get the following for all URLs:
abc.mydomain.com/css/base.css 404 (Not Found)
on the web browser console but my CSS is in the public folder.
my code to link this css is :
<?php echo $this->headLink()->appendStylesheet('/css/base.css') ?>
What should i do to make these addresses work ?
To complete my question : How does the framework distinguish between a folder and a controller or How could i tell the framework to don't act on these URL ass action , they are folders ?
Sounds like a mapping issue associated to the hosting the subdomain. Often on shared hosting you cannot map the project's public folder to the subdomain. So a variety of rewrite tricks are required to map requests for pages and assets into the right directories without confusing ZF about the requested URL.
Check out:
http://www.papayasoft.com/2010/05/08/zend-framework-shared-hosting/
for a description of the problem and various approaches to solving it.
Usually, the baseUrl() view-helper detects (internally, using the Zend_Controller_Front::getBaseUrl() method) what your app's base-url is.
But sometimes, depending upon your vhost setup and the location of your public folder within the doc root - you need to tell the app explicitly what your base-url is.
In application/configs/applicatiom.ini, you can set:
resources.frontController.baseUrl = "http://abc.mydomain.com"
Then in a view-script, you can access public assets using the baseUrl() view-helper and a relative url (relative to the base you set), as follows:
<?php echo $this->headLink()->appendStylesheet($this->baseUrl('css/base.css')) ?>
though I see many people use it as a prefix-only:
<?php echo $this->headLink()->appendStylesheet($this->baseUrl() . '/css/base.css') ?>

Cannot log in to admin after upgrade

I need some help troubleshooting.
I've just upgraded my 1.3 site to 2.0 (with the intent of going on to 2.1). I get the actual page running, content is read from DB etc, but I cannot log in to the admin panel!
Just to make sure I didn't forget the password I did
<?php echo sha1('password' . 'salt'); ?>
Taking the salt from the DB, and the output is the same as is stored in the DB. But still I cannot log in. The log in prompt just reloads, no error message or anything. Any ideas?
I've also tried clearing cache/sessions/etc, and even a different browser to no affect.
Crossposted from the PyroCMS forum: https://www.pyrocms.com/forums/topics/view/19323
OK, since there doesn't seem to be any good suggestions found either here or on the PyroCMS forums and my site is very small content wise I decided to just wipe everything and do a clean install of the latest build instead.
Not a very good solution for future reference, but it will have to do.
From my checklist (it's been a while since I had this happen to me):
If you didn't get an incorrect password error, it may well be you were just being redirected back to the login page before the details were even checked. You can run into issues with enabling the 'Remove index.php from URL' in .htaccess - in /system/cms/config/config.php try changing
$config['index_page'] = 'index.php';
to $config['index_page'] = '';
or (as you've hinted):
clear the contents of default_ci_sessions table
clear the cookies for the domain (a quicker way is to just open a new Google Incognito window which won't have any cookies).
Also - you can initiate a password reset for the admin password using the ordinary user login form if you or someone else does ever forget it (don't though).

Bookmarked page redirect

I recently converted a site from asp to CF. Unfortunately, alot of the old users had the "homepage" bookmarked. www.example.com/homepage.asp
Is there a sort of catch all way I could redirect any traffic from that page to the current index.cfm?
I would normally just delete those files, but the owner(s) wanted to keep it around for their own comparison reasons.
Any ideas?
Thanks
Put this in the old homepage.asp
<%# Language=VBScript %>
<%
Response.Status="301 Moved Permanently"
Response.AddHeader "Location", "/index.cfm"
%>
If you don't want run an onerous asp file at all on the new site, you can do a custom 404 on the web server. If you point the 404 page to a .cfm file, you can extract all the various features from the request by including:
<!--- parse out the text in the URL parameters into an array --->
<cfset variables.requestparams = listtoarray(cgi.query_string,'/?&')>
<!--- get rid of the first 2 items in the array since they dont represent request info --->
<cfset foo = arraydeleteat(variables.requestparams,1)>
<cfset foo = arraydeleteat(variables.requestparams,1)>
You'll be left with an array representing the parameters that were passed in the original request. You can follow up on this by doing whatever analysis you need to on the url components to map it against the analogous pages in your CF site.
I'm surprised nobody has mentioned URL Rewriting. You can use mod_rewrite on *nix/apache, or ISAPI Rewrite or Ionics ISAPI Rewrite on Windows/IIS. I prefer Ionics if I'm on IIS.
The best bet is to do either a meta refresh in the actual homepage.asp page, it is quick and dirty, but works.
A better solution would be to have the .asp page do a 301 redirect to the new homepage, that way when search engines access the page as well they know it has moved.
What I do on Linux machines when I run into something like this is to create a symbolic link (ln -s /path/to/source /path/to/target).
Not sure what the Windows equivalent would be, so going with #Patrick's answer is probably best.
EDIT - The NTFS way of making a symlink:
http://en.wikipedia.org/wiki/NTFS_symbolic_link
see also http://en.wikipedia.org/wiki/Symbolic_link