Whilst small files can be uploaded to forum posts, if you have a custom theme or module to contribute please add it on the "Add-ons" page.
  • Page:
  • 1
  • 2

TOPIC: Upgrading

Upgrading 1 week 3 days ago #1

  • tthdoc
  • tthdoc's Avatar
  • Online
  • New
  • Posts: 11
I have webtrees 1.4.3 which I had done a lot of cosmetic changes (obviously many years ago). It has worked and done everything I want it to without issues, and since I had done the customizing, I did not want to upgrade with the newer versions as I felt I would lose a lot of what I had done and did not wish to go through it again. However, I think my back is now against the wall as I am told by my host that they are migrating to PHP 7 and as such the site will not work. They have me set now on version 5.6 and the site is working, but eventually 5.6 will be phased out. So my question is two fold. Can any changes be made with 1.4.3 to make it compatible with 7, or if not, what is the best course to upgrade without losing all of my customizations.
Thanks,
Doc
The administrator has disabled public write access.

Upgrading 1 week 3 days ago #2

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Posts: 11465
PHP 5.6 is already out of support.
PHP 7.0 is already out of support.
PHP 7.1 will go out of support in one month...

I realise that not everyone can upgrade (or have a host who will upgrade), and so I try to support older versions as long as possible...

webtrees 1.7 runs on PHP 5.6 - 7.4, and will receive security patches for as long as a significant number of people are using it.

Now, back to your question. The first thing to do is identify which changes you have made.
I can't really give any advise without knowing what you've changed.

The easiest way to find out is to create two folders - one contains the standard 1.4.3 code and one contains your modified code.

Then use a "diff" tool to compare the two. I use (and love!) a tool called "meld", which runs on most platforms.
You can get it from meldmerge.org

Once you have a list of the changes you have, we can work out how to re-apply them on the current version of webtrees.
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net
The administrator has disabled public write access.

Upgrading 1 week 3 days ago #3

  • tthdoc
  • tthdoc's Avatar
  • Online
  • New
  • Posts: 11
Greg,

I have meldmerge and ran it on the two folders. I de-selected same and new, with only modified selected. When I expand, I see files that are blue. I assume these are the ones I changed. As I look by double clicking on one, I see some changes, but also see some that are blank lines that are highlighted. It appears that maybe it has to do with space characters in on file vs the other? Any way, you mentioned once I have a list of the changes. How would you go about this? There are many flies listed and as I said, some are just blank line differences. Let me know how to proceed. And also, as to upgrading, I would want my site to stay live while I work through this, so also advise on how to proceed with that. I would guess create a second folder that duplicates the first, and then upgrade that one and then rename it? And is the database upgraded as well, so I would have to duplicate that as well?

Thanks again,

Doc
The administrator has disabled public write access.

Upgrading 1 week 3 days ago #4

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Posts: 11465
In the meld preferences is a section called "Text filters".

You can set it to ignore whitespace only changes, blank lines, etc. These have no significance.

By doing this, you can identify just the significant changes.

> And also, as to upgrading, I would want my site to stay live while I work through this,

Then you will need to create a new/second installation of webtrees using the new code. (e.g. on your local computer).

This will update the database, so you should make a copy of it.

Make/test all your changes to this new installation. When you have finished, copy the code to your server.

Whatever you do, make backups of both your code and your database.

If you need help working out where to make changes in the latest code, just ask.
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net
The administrator has disabled public write access.

Upgrading 1 week 2 days ago #5

  • tthdoc
  • tthdoc's Avatar
  • Online
  • New
  • Posts: 11
Greg,

Thanks, that helped. I am assuming from what you said that the upgrade will change the database? So given that premise, let me know if this will work. On the host I will copy the entire folder "familytree" which is where the current version is. It is accessed on the web with "sitename/familytree" I will rename the copy "familytree_new". The database is called webtrees. I will copy the database and name it webtrees_new. I will then go to familytree_new/data/config.ini.php and change dbname to webtrees_new. Now if I go to "sitename/new_familytree" I will have an exact working copy of my website, except the data is in the new database. Now just download the latest version and copy all of the files to overwrite the new_familytree folder. Is this right so far. And if so, when I go to new_familytree, will I have have a working site but without my mods and I can then start working on them until it is where I want it to be, and then just change the folder name familytree to old_familytree and the new_familytree to familytree and be back in business? Hope that was clear.

Thanks again for the help,
Doc
The administrator has disabled public write access.

Upgrading 1 week 1 day ago #6

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Posts: 11465
That sounds correct.

Keep notes on they changes you make, for any future upgrade...
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net
The administrator has disabled public write access.

Upgrading 1 week 6 hours ago #7

  • tthdoc
  • tthdoc's Avatar
  • Online
  • New
  • Posts: 11
Ok, I am getting error 500. I deleted the error log to start from scratch and then tried to go to the site. Then I checked the error log. Here is what is says:

[16-Oct-2019 01:00:44 UTC] PHP Fatal error: Class 'WT_Module' not found in /home1/markowfa/public_html/markowfamily/new_familytree/modules_v3/justblack_theme_options/module.php on line 31

I checked line 31 and this is what it says:

class justblack_theme_options_WT_Module extends WT_Module implements WT_Module_Config {

And currently, due to the original site running 1.4.3 the htaccess file in the main directory uses php 5.6 I believe. Is this an issue? Do I need to put a separate htaccess file in the new_familytree folder to have it use php 7?

Thanks,
Doc
The administrator has disabled public write access.

Upgrading 1 week 50 minutes ago #8

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Posts: 11465
This error message suggests that you are using a module that was written for an old version of webtrees in a newer version of webtrees.

Delete the module /modules_v3_justblack_theme_options

As far as I know, there is a newer version of this module available. Find/install it.
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net
The administrator has disabled public write access.
Do you need a web hosting solution for your webtrees site?
If you prefer a host that specialises in webtrees, the following page lists some suppliers able to provide one for you: 

Upgrading 6 days 16 hours ago #9

  • tthdoc
  • tthdoc's Avatar
  • Online
  • New
  • Posts: 11
Greg,

I started over, uploaded all the files overwriting anything it found, then deleted the justblack theme from the themes folder and the justblack options from the modules_v3 folder. I am able to open the page now, but now when I go to the control panel and click on modules administration, I get a blank page. And checking the server it is not throwing any error code, so I am not sure what is going on. All the other links in the control panel seem to be working fine.

Thanks,
Doc
The administrator has disabled public write access.

Upgrading 6 days 12 hours ago #10

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Posts: 11465
Blank page means (a) fatal error and (b) your server is configured not to display errors.

If errors aren't being written to the apache logs, then you should try get your server to display errors..

Google: htaccess PHP display_errors
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net
The administrator has disabled public write access.

Upgrading 6 days 9 hours ago #11

  • tthdoc
  • tthdoc's Avatar
  • Online
  • New
  • Posts: 11
Greg,

I went into admin_modules.php (the file when you click on modules administration) and typed dog right above namespace line to force an error and saved it. I then went back to modules administration and it gave a 500 error. Checked and there was an error log entry. So it is giving errors and logging them. When I delete dog and save it again, it then gives a blank page and nothing is in the error log. I spoke with bluehost and since they are not familiar with php that much, they could not help either. Any other suggestions, or is it possible for us to do a screen share sometime?

Thanks,
Doc
The administrator has disabled public write access.

Upgrading 6 days 7 hours ago #12

  • kiwi
  • kiwi's Avatar
  • Offline
  • Platinum
  • Posts: 4963
Have you checked for any more non-standard modules? Thats thr most common cause of this type of error.

If you are not sure, delete all of them and upload only the standard set.
Nigel

www.our-families.info

Hosted at:
Follow me at:
The administrator has disabled public write access.

Upgrading 6 days 39 minutes ago #13

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Posts: 11465
> nothing is in the error log

Just to be clear, I am talking about your WEBSERVER error log, not the WEBTREES error log.
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net
The administrator has disabled public write access.

Upgrading 4 days 9 hours ago #14

  • tthdoc
  • tthdoc's Avatar
  • Online
  • New
  • Posts: 11
Greg & Nigel,

Thanks for the help. Greg, yes I was talking about the webserver error log. What I ended up doing was completely deleting the new folder and database off the server. I then started from scratch. I duplicated the familytree folder, duplicated the database, and then created a new user for the new database. I then upgraded the newfamlytree, deleted the justblack folder and options folder, and then tested it. It worked and was able to access the module administrator. I then uploaded the new justblack folder and options module, checked it again, and so far all is working well. So I am now in the process of editing the css file as I did on the original, and will tweak any changes I did on the original. So far all is well.

Thanks again for the help.
Doc
The administrator has disabled public write access.

Upgrading 4 days 7 hours ago #15

  • tthdoc
  • tthdoc's Avatar
  • Online
  • New
  • Posts: 11
Ok, in the process of comparing modifications I had made and applying them to the new site, I have noticed something that seems to be a reoccurring event. As an example, the gedcom stats page when I log in. I had made some modifications to the file module.php in the gedcom_stats folder. But in the current version, if I open module.php, I only see the following:

namespace Fisharebest\Webtrees;
use Fisharebest\Webtrees\Module\FamilyTreeStatisticsModule;
return new FamilyTreeStatisticsModule(__DIR__);

So if I would like to make the same modifications I did on the 1.4.3 version, how do I do this? Or is it not possible now?

Thanks again,
Doc
The administrator has disabled public write access.

Upgrading 4 days 17 minutes ago #16

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Posts: 11465
The code has moved. You can now find it in the file /app/Fisharebest/Webtrees/Module/FamilyTreeStatisticsModule.php
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net
The administrator has disabled public write access.

Upgrading 3 days 8 hours ago #17

  • tthdoc
  • tthdoc's Avatar
  • Online
  • New
  • Posts: 11
Thanks Greg,
Actually it was found in /app/Modules folder. In working with my modifications, I noticed something else.
Here are the most common surnames in the old site:

ADLER, BLOCK, BUCKNER, COHEN, ELLIS, FREEDMAN, FRIEDMAN, HARRIS, JACOBS, MALINOW, MARKOFF, MARKOW, PLATT, SCHUNICK, SHAPIRO, SILVERMAN, SMITH

But the new site shows:

???, ADLER, BUCKNER, FRIEDMAN, HARRIS, HARRIS , MALINOW, MARKOFF, SCHUNICK, SHAPIRO, SILVERMAN

The old site had an option in admin to put a threshold in, and what not to include (like ???). I don't see that option in the new version. What I had on the old site was to ignore ??? and a threshold of 20. Is that setting no longer available or am I missing it somewhere. And as you see in the second listing, Harris shows up twice and it is one link (Harris, Harris is one linked object)

Thanks again for all the help,
Doc
Last Edit: 3 days 8 hours ago by tthdoc.
The administrator has disabled public write access.

Upgrading 3 days 8 hours ago #18

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Posts: 11465
The option to "force add" surnames to the list was added very many years ago, as an aid for search engines.

However, the statistics block is slow (and is therefore loaded dynamically after the rest of the page), and search engines won't see it.

So, the "surnames to include" option was removed. If you want surnames to appear on the home page, create an HTML block and add whatever content you want.

> Harris shows up twice and it is one link (Harris, Harris is one linked object)

You've probably got two versions of the name - perhaps one is not entered correctly. Maybe it's entered in the surname-prefix field or something like that. Perhaps it has a non-printing character at the end? You can fix it by cleaning up your data...

> ignore ???

Instead of using ??? as a surname, you should ideally leave the surname empty. e.g.

John //

rather than

John /???/

This is the GEDCOM standard way to do it, and webtrees handles it nicely. It displays the surname as "unknown", and shows it separately on lists.

You could use a search/replace of "/???/" with "//" to update them.
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net
The administrator has disabled public write access.

Upgrading 3 days 6 hours ago #19

  • tthdoc
  • tthdoc's Avatar
  • Online
  • New
  • Posts: 11
Thanks. I tried to do a search/replace and it shows up with the first entry, and if I click next or update, I get the following error:

Not Acceptable!
An appropriate representation of the requested resource could not be found on this server. This error was generated by Mod_Security.

Thanks,
Doc
The administrator has disabled public write access.

Upgrading 3 days 24 minutes ago #20

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Posts: 11465
Your server is using a package called "mod-security".

This blocks requests that it thinks are "suspicious". It is presumably blocking /???/

You'll need to ask your webhost to allow this text. There's nothing you can do to work around it.

Be grateful you had the error message. Many mod-security installations just fail silently with a blank page....
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Powered by Kunena Forum