A little more Updated (farmOS v1 -> v3)

I successfully installed FarmOs on localhost and I have already created my own module called Growth Matrix. although I have everything working, but some things make me worried, such as the drupal 7 version and several warnings at http://localhost/farm7/admin/reports/updates of modules not updated.

Today I tried to upgrade all adviced modules. But, on the end the application just stop to work (complaining about the entity module)

Would there be a link with a downloadable version of farmOs with a more up-to-date Drupal and modules?

Or, would there be a tutorial that would help us update farmOs with more current modules?

TIA

1 Like

@brazilcr What was your process for installing farmOS? Did you follow the official guide here? https://farmOS.org/hosting/install/

If so, you should end up with the latest version which is farmOS 3.1.2, running on Drupal 10.2.3.

farmOS v1 was built on Drupal 7. Is it possible you installed v1? I’m curious what your process was.

The next version of farmOS will be on Drupal 10.2.4. It is not recommended to update Drupal core separately from farmOS, because they are closely intertwined. farmOS applies necessary patches to Drupal core, and updating it separately might not include those. The official guide for updating covers this: https://farmOS.org/hosting/update/

1 Like

Tks for your reply… Well… At first, I didn’t find a single complete tutorial, they were all too short or simply didn’t come/go anywhere (for a typical Windows 11 user like me). So I continued on a trial and error basis, even without any experience with Drupal

I’m currently on the latest version of farmOS 3.1.2. And now, after some videos, I’m a little more familiar with the Drupal environment.

My Drupal core is 7.100

My dev environment now is wampserver 3.3.0 (64b), php 7.4, mysql and apache 2.4.54… My planning for this next week will be to create a production environment in a usual host like hostgator.

The module that I’ve working is about to manager/monitor the growth for crops as algaes.

The link to update farmOS only cover farms os core modules only… Other modules as Chaos Tool Suite, Geocoder, Geofields, Colorbox, Date, etc… Continues outdated… So… This is maybe the center of my doubts… Which of those can also be upgraded… so maybe I can improve this feeling of technological debt in relation to the solution that I am adopting

2 Likes

Technically speaking, that is not possible. farmOS v3 can only work on Drupal 10.

Most of those module (except Geofield) are no longer used in farmOS v2+. They were part of farmOS v1. But generally speaking, you will not need to worry about updating modules individually… (more on that below)

Do you have any data in this farmOS database that you need to save? Or are you just getting started? If you are just getting started, then delete everything you started with and let’s start from scratch. :slight_smile:

(If you built your custom algae module on farmOS v1, you will need to update it to work on farmOS v3. So move that to a safe place first. But let’s focus on getting farmOS v3 installed properly first, and understand what your process will be for updating it moving forward. This is critical to avoid future frustration.)

farmOS v3 requires PHP 8+, so you will either need to upgrade your WAMP PHP version, or use a different machine that has PHP 8+. A host like hostgator will most likely have PHP 8+ as an option, since PHP 7 was end-of-life in November 2023.

I always recommend using Docker for hosting farmOS, because it includes all of the necessary requirements (including Apache and PHP with the correct versions). However, shared hosting environments probably don’t provide options for running Docker containers (I’m not familiar with Hostgator, so I can’t say). So, that is why we also provide farmOS in the form of “packaged releases”. These are tarball files that you can unpack directly in your webroot and they include all of the code necessary (including the correct patched version of Drupal and all contrib modules). They do NOT include Apache, PHP, PostgreSQL/MySQL, Geos, or other dependencies that are described on https://farmOS.org/hosting/install/.

Both approaches (Docker and packaged releases) are described on that page:

Here is where you can get a tarball of the latest farmOS v3.1.2: https://github.com/farmOS/farmOS/releases/download/3.1.2/farmOS-3.1.2.tar.gz

Try downloading and unpacking that in your webroot.

Regarding updating Drupal core and individual modules…

It is important to think of farmOS as a “Drupal distribution”, not as simply a “Drupal module”. You will not be updating Drupal core or contrib modules individually. You will only be updating farmOS as a whole. The process for that is to download the new farmOS tarball, delete everything in your webroot except for the “sites” folder (which contains your settings.php and all your uploaded files), and unpack the new tarball. This is described here: Updating farmOS | farmOS

(There are exceptions to this, such as if you are using Composer to manager your farmOS installation and dependencies, but I am assuming that you just want a packaged release that you can unpack in your webroot.)

Hope that helps!

2 Likes

Hi MIke @mstenta ,

Thank you for your support… Your contribution is very important… I am grateful…

I’m an experienced systems analyst, developer for over 30 years… +20 years with just php and java… the functional way I managed to make the system work was… I make a 7.x version functional and put 3.1.12 on top of it… With this the system got working. Every function working without any type of restrictions

but… because I wasn’t satisfied with the fact that I was technically out of date and on a very old version of Drupal… I decided to follow your instructions… But it didn’t work here for me!

I install Drupal 10 without any problem… I copy the package you gave me the link according to your instructions to throw on installed Drupal’s webroot… But everything ends with http error 500. Maybe I have lost some important detail… But, this is what I meant before… I could not found any detailed step by step tutorial… And maybe there is something that I am missing here.

BTW, I tried both PHP 8.2, 8.0 and 7… On my wampserver here I can walk easily through diff release

1 Like

@brazilcr Can you share what the 500 error is? The Apache log should provide more detail.

Can you also share a screenshot or list of files in your webroot?

One point worth noting: the farmOS tarball has a web subdirectory which is meant to be used as the webroot (that is where Drupal’s index.php is), but the directories outside of that (including vendor) are required for proper functioning. If you have the ability to customize where Apache’s webroot is pointed, you can add web to the end of that configuration. Or, if you can’t, then try going to https://[your-farmOS-URL/web and see if that works.

Here it is enclosed… sorry many info in PT_BR

apache webroot is c:\wamp64\www

drupal 10/farmOs root in dev environment (localhost/farmoc)

Here it is the farmOs with drupal 7… Installed first under 7.x and after all copied from 3.1.2

Ghost in the machine??? :slight_smile: maybe :laughing:

Ah wow! Yea that’s farmOS v1 (with some theme modification it looks like?)

OK so does this mean you have real data that you need migrated to v3? If so PLEASE do not make any changes to your REAL database. I don’t want you to lose any data.

You can’t “update” from v1 to v3. You need to “migrate” from v1 to v2, then you can “update” from v2 to v3. The differences between v1 and v2 (Drupal 7 and Drupal 9) are so big that it is not possible to simply drop the new code into place. You must set up a farmOS v2 instance separately from your v1 instance, and then migrate data from v1 to v2. Your v1 database will not be changed at all in this process, so you can leave it alone.

The “migration” code was removed from farmOS v3. So you can’t migrate directly from v1 to v3. You need to go to v2 first, and then update v2.

This is the official guide:

Looking at your webroot… it looks like you have both v1 and v3 installed in the same place perhaps? There should not be an index.php (or most of those files) alongside web and vendor.

These are the only files in my webroot:

www-data@55ff7bf25771:/opt/drupal$ ls 
LICENSE  README.md  composer.json  composer.lock  keys	vendor	web

The index.php file is in the web subdirectory:

www-data@55ff7bf25771:/opt/drupal/web$ ls 
INSTALL.txt  autoload.php  example.gitignore  libraries  profiles    sites   update.php
README.md    core	   index.php	      modules	 robots.txt  themes  web.config

If you have made any customizations to the database, or if you have custom modules (which it sounds like you do), these will NOT be automatically updated to v3.

farmOS v1 → v2 was basically a complete rewrite. We did not have a choice in this matter because Drupal 7 → Drupal 8 itself was a complete rewrite. Thankfully moving fowards (Drupal 8 → 9 → 10 → 11 → …) shouldn’t require the same effort. We started v2 on Drupal 9, and the update from Drupal 9 to Drupal 10 was very easy.

I just want you to be aware that there may be some additional effort involved. The migration guide on farmOS.org assumes you have a default farmOS v1 instance. Any additional customizations or custom modules are going to be your responsibility to upgrade and provide a data migration path for.

No I don’t need to save any data… all info showed is about dev testing only…

during the development of my module I had to make many tests

1 Like

Oh phew! That’s a relief. Your job is much easier then. :sweat_smile:

1 Like

well… to be used on farm-growthmatrix I had to create three tables

farm_growthmatrix
farm_growthmatrix_monitor
farm_growthmatrix_items

1 Like

This is the purpose for tables… To have predictability of crop growth, we monitor to see the type of crop growth compared to predicted

1 Like

no problem… I can re adapt/install my module to a new release… my deal now is to make this drupal 10/farmos 3 work here… I’m still on the phase to start to the end users yet… No kind of tranning has done with them…

BTW, the end users will use an android application that will be write yet

1 Like

That’s great @brazilcr!! I’d love to learn more about this module! (Perhaps in a separate forum topic, if/when you are ready to share with others?)

Yes, let’s focus on getting your farmOS v3 working. I would say try to set it up separately from your farmOS v1 experiments, so that you still keep those intact.

1 Like

As soon as I do the implementation here for the module… It will be a pleasure do share with you all…

the yesterday test was in a diff database / web root path… I keeped my “farm7” folder / “farm_oceanic” database working and created a “farmoc” web root path and “farm10_oceanic” database

The PHP log I already sent you… There is no kind of Apache error on the log

Try this:

  1. Start with a completely empty directory.
  2. Download and unpack this tarball: https://github.com/farmOS/farmOS/releases/download/3.1.2/farmOS-3.1.2.tar.gz
  3. Point your Apache webroot configuration to the web directory that was unpacked. (OR: just open the URL in your browser, but add web to the end).

What do you get?

Sorry for the delayed response, following these last steps I was able to install it. my doubts was in this web directory which is actually the root… A root that is not so root after all

but unfortunately I saw in the database that a lot stuffs has changed… So I will have to make a lot of changes to my module to work in this new version

mainly in the concept of season… before a harvest was two dates linked to taxonomy… Now if I got correctly, it is a resource linked to two logs (to know how many days the season is)

1 Like