[Flarum] A lightweight forum

Tried the commands you gave me, first one went through, second one returned this :

/var/www/flarum# sudo -u flarum php7.3 /var/www/flarum/composer.phar require 'flarum/core:~1.0.0' --prefer-dist --update-no-dev -a --update-with-all-dependencies -d /var/www/flarum --no-interaction
Warning from https://repo.packagist.org: Support for Composer 1 is deprecated and some packages will not be available. You should upgrade to Composer 2. See https://blog.packagist.com/deprecating-composer-1-support/
./composer.json has been updated
Loading composer repositories with package information
Warning from https://repo.packagist.org: Support for Composer 1 is deprecated and some packages will not be available. You should upgrade to Composer 2. See https://blog.packagist.com/deprecating-composer-1-support/
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - flarum/approval v0.1.0-beta.13 requires flarum/core ^0.1.0-beta.13 -> satisfiable by flarum/core[v0.1.0-beta.13, v0.1.0-beta.14, v0.1.0-beta.14.1, v0.1.0-beta.15, v0.1.0-beta.16] but these conflict with your requirements or minimum-stability.
    - flarum/approval v0.1.0-beta.13 requires flarum/core ^0.1.0-beta.13 -> satisfiable by flarum/core[v0.1.0-beta.13, v0.1.0-beta.14, v0.1.0-beta.14.1, v0.1.0-beta.15, v0.1.0-beta.16] but these conflict with your requirements or minimum-stability.
    - flarum/approval v0.1.0-beta.13 requires flarum/core ^0.1.0-beta.13 -> satisfiable by flarum/core[v0.1.0-beta.13, v0.1.0-beta.14, v0.1.0-beta.14.1, v0.1.0-beta.15, v0.1.0-beta.16] but these conflict with your requirements or minimum-stability.
    - Installation request for flarum/approval (locked at v0.1.0-beta.13, requir4ed as ^0.1.0) -> satisfiable by flarum/approval[v0.1.0-beta.13].

Running update with --no-dev does not mean require-dev is ignored, it just means the packages will not be installed. If dev requirements are blocking the update you have to resolve those problems.

Installation failed, reverting ./composer.json to its original content.

And Flarum 1.0 update still fails the same way… I tried to tweak with composer.json (as shown in the flarum documentation) but it did not change anything so i reverted it back to original.


Since my install seems a bit sketchy, wouldn’t it be easier/safer to backup the forum files, reinstall a fresh 1.0 flarum and reinject the saved forum files ? Assuming those posts/photos/users/etc. are easily backupable and restored…

Anyone having any thoughts on this ?

Posts are in the database. :wink:

Which ultimately means… ? :sweat_smile:

Down the line? That’s hacky and it will be difficult to get proper support from here/me or Flarum’s people themselves.

Ok so 2 solutions : a way to properly update comes up, or i’m stuck in beta13 forever !

The former is preferable.

1 Like

Okay so i figured the f*ck out of it !

I was following the update recommandations given in the flarum documentation but with cold feet, so i did not go all the way (was afraid to lose data because of conflicts between flarum/php command lines and yunohost update processes or whatever, weird stuff happened to me before with nextcloud and i lost it all, so yeah).

This time i followed exactly the steps in the docs :

  • delete extensions
  • edit composer.json
  • run sudo -u flarum php7.3 composer.phar why-not flarum/core 1.0 which showed dependances version conflicts all over the place
  • run sudo -u flarum php7.3 composer.phar update --prefer-dist --no-plugins --no-dev -a --with-all-dependencies to update those and flarum core
  • finally run sudo -u flarum php7.3 flarum migrate and sudo -u flarum php7.3 flarum cache:clear and all is well

update : YNH still sees it as beta 0.13, can i run the update from the admin panel and it will come to reason or is there a tweak to do somewhere ?

1 Like

That’s normal. The version is given by the package when it is processed by YunoHost. YunoHost will not update that version if you manually alter your app. :wink:

The version will be updated upon the next upgrade via the normal means.

2 Likes

Bonjour,

Je viens de lancer la mise à jour de YNH, de toutes nos applis, puis celle de Flarum.

Flarum a rencontré une erreur et ne s’est pas mis à jour.

Je joins le log comme demandé : https://paste.yunohost.org/raw/oquzuviduv

Pour mémoire, il y a quelques mois, suite à des problèmes de connexions après une mise à jour, il avait été demandé de modifier des paramètres dans la BD :).

À noter que lorsque l’on demande de mettre le jour du système YUNOHOST, il y a cette erreur :slight_smile:

W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/extra_php_version.list:1 and /etc/apt/sources.list.d/sury.list:1
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/extra_php_version.list:1 and /etc/apt/sources.list.d/sury.list:1
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/extra_php_version.list:1 and /etc/apt/sources.list.d/sury.list:1
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/extra_php_version.list:1 and /etc/apt/sources.list.d/sury.list:1
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/extra_php_version.list:1 and /etc/apt/sources.list.d/sury.list:1
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/extra_php_version.list:1 and /etc/apt/sources.list.d/sury.list:1

Des erreurs se sont produites lors de la mise à jour du cache APT (gestionnaire de paquets Debian). Voici un extrait des lignes du fichier sources.list qui pourrait vous aider à identifier les lignes problématiques :
sources.list:deb http://deb.debian.org/debian buster main contrib non-free sources.list:deb-src http://deb.debian.org/debian buster main contrib non-free sources.list:deb http://security.debian.org/ buster/updates main contrib non-free sources.list:deb-src http://security.debian.org/ buster/updates main contrib non-free sources.list:deb http://deb.debian.org/debian buster-updates main contrib non-free sources.list:deb-src http://deb.debian.org/debian buster-updates main contrib non-free sources.list.d/sury.list:deb https://packages.sury.org/php/ buster main sources.list.d/yunohost.list:deb http://forge.yunohost.org/debian/ buster stable sources.list.d/mongodb-org-4.4.list:deb http://repo.mongodb.org/apt/debian buster/mongodb-org/4.4 main sources.list.d/influxdb.list:deb https://repos.influxdata.com/debian buster stable sources.list.d/extra_php_version.list:deb https://packages.sury.org/php/ buster main

Ce qui n’empêche pas à la fin :slight_smile:
Le catalogue des applications a été mis à jour !

J’ai une autre instance YNH aussi sur un VPS OVH, je n’ai pas cette erreur.

Merci d’avance d’un retour.

jrd10 Tricassinux.

New release !

  • Master branch status as of 2021-11-12: PR178
    • :arrow_heading_up: Upgrade to v1.1.1 :partying_face:
    • Fix the extensions dependencies upgrade and let Composer install the suitable versions
    • Fix a bug with app helper, you need to upgrade to YunoHost v4.3 beforehand

@Aristid @jrd10 let me know if that fixes your issues.

3 Likes

Good news : update worked flawlessly but bad news : i cannot reinstall any extension as this command for example :

/var/www/flarum# sudo -u flarum php7.3 composer.phar require clarkwinkelmann/flarum-ext-comicsans

gives this output :

Using version ^1.0 for clarkwinkelmann/flarum-ext-comicsans
./composer.json has been updated
Running composer update clarkwinkelmann/flarum-ext-comicsans
Loading composer repositories with package information
Updating dependencies
Lock file operations: 1 install, 0 updates, 0 removals
  - Locking clarkwinkelmann/flarum-ext-comicsans (1.0.0)

Installation failed, reverting ./composer.json and ./composer.lock to their original content.


  [ErrorException]
  file_put_contents(./composer.lock): failed to open stream: Permission denied


require [--dev] [--dry-run] [--prefer-source] [--prefer-dist] [--fixed] [--no-suggest] [--no-progress] [--no-update] [--no-install] [--no-scripts] [--update-no-dev] [-w|--update-with-dependencies] [-W|--update-with-all-dependencies] [--with-dependencies] [--with-all-dependencies] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--] [<packages>]...

Ah… what’s the output of ls -la /var/www/flarum ?

drwxr-x---   6 flarum www-data    4096 nov.  12 14:20 .
drwxr-xr-x+ 19 root   root        4096 nov.  12 14:06 ..
-rw-r-----   1 flarum www-data    1757 mai   27 10:54 CHANGELOG.md
drwxr-xr-x   3 root   root        4096 nov.  12 14:06 .composer
-rw-r-----   1 flarum www-data    1310 nov.  12 14:16 composer.json
-rw-r--r--   1 root   root      316087 nov.  12 14:07 composer.lock
-rwxr-xr-x   1 root   root     2216568 nov.  12 14:06 composer.phar
-rwxr-x---   1 flarum www-data     534 nov.  12 14:06 config.php
-rw-r-----   1 flarum www-data     361 mai   27 10:54 .editorconfig
-rw-r-----   1 flarum www-data     265 mai   27 10:54 extend.php
-rw-r-----   1 flarum www-data     634 mai   27 10:54 flarum
-rw-r-----   1 flarum www-data    1168 mai   27 10:54 LICENSE
-rw-r-----   1 flarum www-data    1764 mai   27 10:54 .nginx.conf
drwxr-x---   3 flarum www-data    4096 mai   27 10:54 public
-rw-r-----   1 flarum www-data    2665 mai   27 10:54 README.md
-rw-r-----   1 flarum www-data    1800 mai   27 10:54 site.php
drwxr-x---  10 flarum www-data    4096 mai   27 10:54 storage
drwxr-xr-x  43 root   root        4096 nov.  12 14:07 vendor

Oui, cela fonctionne bien, il s’est bien mis à jour

Flarum 1.1.1
PHP 7.3.31-2+0~20211022.89+debian10~1.gbp745ac7
MySQL 10.3.31-MariaDB-0+

J’ai testé, tout va bien :slight_smile:

Du coup, je vous passe le lien du dernier post :slight_smile:

Et justement, comment peut-on faire “passer” cette image dans le lien (avec Flarum) ?

Dans le brouillon, il apparaît ce message :slight_smile:

Sorry, we were unable to generate a preview for this web page, because the following oEmbed / OpenGraph tags could not be found: description, image

Merci de cette mise à jour et de ton temps

Cordialement, jrd10

1 Like

Ah yeah sorry. We are missing a chown in the script. I will release a patch by tomorrow.

1 Like

New patch release !

  • Master branch status as of 2021-11-13: PR180
    • :bug: Fix file ownership
    • :bug: Make sure the version requirements for language extensions are loosen

@Aristid @jrd10 let me know if that fixes your issues. :wink: Please open a dedicated thread if not.

Nah. Adding extensions after installation just dont work. I’m upset haha. Seriously guys, please update the faq.

./composer.json has been updated
Running composer update vendor/extension --with-dependencies
Loading composer repositories with package information
Dependency “app/core” is also a root requirement. Package has not been listed as an update argument, so keeping locked at old version. Use --with-all-dependencies (-W) to include root dependencies.
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

Problem 1
- Root composer.json requires vendor/extension ^0.1.1 → satisfiable by tvendor/extension.
- vendor/extension requires vendor/extension ^0.1.0-beta.10 → found bla bla but it does not match your minimum-stability.

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

Fascinating. I am not sure how withholding information in your log can help me help you. Please open a dedicated App support thread and ping me there.

1 Like

Thanks… and sorry!