Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
SJ77 Posted March 6, 2019 Posted March 6, 2019 After last weeks EPIC FAIL with a 4.4 upgrade I have decided to get a proper test site up and running. I will test fire changes there before blowing up my live site (again). Why didn't I do this in the first place you ask? Well because getting a cloned version of IPS to work is a pain in the butt. I never could get one to work, and I tried. This time I am determined. Here is what I have done so far. copied all of my site files into a nested test folder within my main domain. (should keep my ssl from causing me issues)https:// www.mysite.com/forum/test made a test version of my data base and connected my test site config file to it. also updated the config file site address to point to https://www.mysite.com/forum/test/ in constants file I defined a new cookie prefix define( 'COOKIE_PREFIX', 'test_' ); With every thing wired up I tried to load the site and got a lovely server error. Here is what the error log says: Any idea what I did wrong? thrown in /home/admin/web/mysite.org/public_html/forum/test/system/Patterns/ActiveRecord.php on line 114" while reading response header from upstream, client: 73.281.236.23, server: mysite.org, request: "GET /forum/test/admin/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:9001", host: "mysite.org" 2019/03/06 10:54:48 [error] 24905#24905: *17608262 open() "/home/admin/web/mysite.org/public_html/search" failed (2: No such file or directory), client: 66.259.72.79, server: mysite.org, request: "GET /search?q=%ED%83%9C%EB%B0%B1%EC%BD%9C%EA%B1%B8%E3%80%90%EC%B9%B4%ED%86%A1%3A+Po+3+4%E3%80%91%7BKra25.c%EF%BC%90M%$ 2019/03/06 10:54:48 [error] 24911#24911: *17608333 open() "/home/admin/web/mysite.org/public_html/favicon.ico" failed (2: No such file or directory), client: 37.146.333.45, server: mysite.org, request: "GET /favicon.ico HTTP/1.1", host: "mysite.org", referrer: "https://mysite.org/forum/uploads/monthly_2019_03/D$ 2019/03/06 10:54:51 [error] 24909#24909: *17608636 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught OutOfRangeException in /home/admin/web/mysite.org/public_html/forum/test/system/Patterns/ActiveRecord.php:114 Stack trace: #0 /home/admin/web/mysite.org/public_html/forum/test/system/Lang/Lang.php(78): IPS\Patterns\_ActiveRecord::load(NULL, 'lang_id', NULL) #1 /home/admin/web/mysite.org/public_html/forum/test/system/Member/Member.php(2018): IPS\_Lang::load(NULL) #2 /home/admin/web/mysite.org/public_html/forum/test/system/Member/Member.php(425): IPS\_Member->language() #3 /home/admin/web/mysite.org/public_html/forum/test/system/Patterns/ActiveRecord.php(307): IPS\_Member->get_name() #4 /home/admin/web/mysite.org/public_html/forum/test/system/Session/Admin.php(116): IPS\Patterns\_ActiveRecord->__get('name') #5 [internal function]: IPS\Session\_Admin->write('8dea3541af3d379...', '') #6 [internal function]: session_write_close() #7 {main}
AlexJ Posted March 6, 2019 Posted March 6, 2019 Little off topic - Make sure you update the URL's for upload and such in Admin CP in your test site - or new test upgrade will use your old attachment URL and it will mess up your live website.
SJ77 Posted March 6, 2019 Author Posted March 6, 2019 10 minutes ago, AlexJ said: Little off topic - Make sure you update the URL's for upload and such in Admin CP in your test site - or new test upgrade will use your old attachment URL and it will mess up your live website. Great tip! I’ll need to find all the places this is needed. I want to makes an action step check list so I can easily blow up the test site and rebuild it as needed. This should be on the list
SJ77 Posted March 6, 2019 Author Posted March 6, 2019 1 minute ago, Tom S. said: Did you update the info in your config_global.php? yup. (bullet 2 & 3 above)
Adlago Posted March 6, 2019 Posted March 6, 2019 Remove all files datastore directory on test site If you use a htaccess file in a root, remove it in the test directory. You can create a htaccess file there after you can start your site from there
SJ77 Posted March 6, 2019 Author Posted March 6, 2019 19 minutes ago, Adlago said: Remove all files datastore directory on test site If you use a htaccess file in a root, remove it in the test directory. You can create a htaccess file there after you can start your site from there I am using nginx so no htaccess, but I will try clearing the datastore folder. EDIT: clearing the datastore folder had no noticeable benefit. Same error on site still occurring.
Adlago Posted March 6, 2019 Posted March 6, 2019 2 hours ago, SJ77 said: Here is what the error log says: Reading this error you get - this is an attempt to load from cache. Here is the code of the ActiveRecord php /* Some classes can load directly from a cache, so check that first */ if( static::$loadFromCache !== FALSE AND $idField === static::$databasePrefix . static::$databaseColumnId AND $extraWhereClause === NULL ) { $cachedObjects = static::getStore(); if ( isset( $cachedObjects[ $id ] ) ) { return static::constructFromData( $cachedObjects[ $id ] ); } else { throw new \OutOfRangeException; } } Perhaps you would try that 1. Use the ACP support tool on a live site, once the recaching is completed, at the same time download the backup to a database. 2. Rename this backup with the name of the test database and upload it to in test database.
Adlago Posted March 6, 2019 Posted March 6, 2019 PS. Since your live site is large, it might be a good idea first to go offline, then recache a site and backup your database. So I think it will be right. After downloading a backup, turn online a site
Tom S. Posted March 6, 2019 Posted March 6, 2019 Quote "/home/admin/web/mysite.org/public_html/search" Seeing this makes me think that something somewhere is still pointing to your live site... Trying to think of a setting in the ACP but nothing comes to mind.
Adlago Posted March 6, 2019 Posted March 6, 2019 Hm, strange... This for me work https://yoursite.org/forum/index.php?/forums/test and https://yoursite.org/forum/index.php?/forums/test/index.php these links load your home page
Black Tiger Posted March 6, 2019 Posted March 6, 2019 A .htaccess issue in root or test dir or vhost?
SJ77 Posted March 7, 2019 Author Posted March 7, 2019 1 hour ago, Adlago said: Hm, strange... This for me work https://yoursite.org/forum/index.php?/forums/test and https://yoursite.org/forum/index.php?/forums/test/index.php these links load your home page got the home page working but the ACP is botched up now. Can't get it to work. Turns out that issue was caused because redis server cannot be shared. 1 hour ago, Black Tiger said: A .htaccess issue in root or test dir or vhost? I have nginx not apache
Adlago Posted March 7, 2019 Posted March 7, 2019 7 hours ago, SJ77 said: I have nginx not apache I allowed myself to do a small analysis of your live site. Here's what I see. 1. You are not effectively using your root directory. Your site is located in a subdirectory "forum" Every visitor chooses a https: // yoursite.org in address bar browser, that receives a 301 redirection to " https://yoursite.org / forum " - and this brings 400 milliseconds delay to the initial download of your resources. Tip: Move all of your files to the root directory and remove the redirection. You have a nice domain, and you bring the ugliness into the address internet space. 2. You don't use a FURL. This creates quite large processing links and creates a sense of disorderedness in your navigation site. There is a lot of information on how to create a rewrite rule for your server. IPS uses the htaccess content in the instructions for this file for apache server. For your server nginx just enter this. location / { try_files $uri $uri/ /index.php?$args; } but this is where your site files are located in the root directory. More information is available here. https://www.nginx.com/blog/converting-apache-to-nginx-rewrite-rules/ This will stop displaying long links including index php and so on. 3. For your test site - now you have created a subdirectory "test" on a subdirectory "forum". This is poor performance - in the hierarchy of your server structure. Too many dependencies and distance from your root. 4. Finally for my tips - place your site in the root directory. Remove redirection.Place your test site in a subdirectory "https: //yoursite.org/test" Place rewrite rules in the root and in the test directory and use FURL. I think then everything will work correctly and you will not have problems with the upgrade.
SJ77 Posted March 7, 2019 Author Posted March 7, 2019 Hi @Adlago Really kind of you to take some time analyzing things to this level. I really appreciate it. I would actually love to do all of this but it's a little intimidating. I worry that my site starts crashing due to broken javascript, datastore, and css files. (plus anything else) I also worry about losing massive SEO. My site has been nested in a forums folder for 12 years. We are doing very well with Google. I would hate to give all that up. Broken back links all over. YIKES
Adlago Posted March 7, 2019 Posted March 7, 2019 Yes, it may seem startling. But I think this is a challenge that is worth your efforts. If I have to use allegory, the website is your virtual home. Root directory is your login for this home. Now, as if you put a sign at the entrance - please enter through the first floor. A test site as you install it is as if on the ceiling ... Every home is welcoming when Guests and Friends entering the front door. Think about it and do it before you upgrade. Still, you know the best your virtual home .
Adlago Posted March 7, 2019 Posted March 7, 2019 3 hours ago, SJ77 said: I also worry about losing massive SEO Yes, in this direction you have a lot of work to do. Take a test here https://sitechecker.pro/ and get a lot of information about improvements.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.