[Beta] [Needs Testing] Pico CMS for Nextcloud v1.0.0

Pico CMS for Nextcloud v1.0.0 is out now! :partying_face: :confetti_ball: :tada:

:arrow_right: You can find the full announcement here: Pico CMS for Nextcloud v1.0.0 is out now! :arrow_left:


Announcement for beta testers

First I want to give a big :clap: :clap: :clap: to all beta testers!

Thank you guys for testing and helping to improve Pico CMS for Nextcloud. We finally made it, we got a stable release! :heart:

As you know Pico CMS for Nextcloud v1.0.0 is mostly a rewrite from scratch. If you’re a developer and want to check out the code changes, simply compare v0.9.8 with v1.0.0 - it’s a massive changeset, the pull request itself consists of 238 commits with 14,801 added, 5,669 removed and 20,470 lines of code in 179 files. This is huge! :heart_eyes: Just check out the original announcement for the first beta for more details.

Even though the stable version is finally there, we’re still looking forward to your feedback and reviews! Thank you! :+1:


Download

You can download Pico CMS for Nextcloud’s release archive from here:

:arrow_right: cms_pico-1.0.0.tar.gz (Click here to download!) :arrow_left:

Heads up! If you’re currently running Pico CMS for Nextcloud v1.0.0-beta.1 you MUST upgrade to v1.0.0-beta.2 first before upgrading to v1.0.0 - you’ll break your installation otherwise!. Please refer to the announcement of v1.0.0-beta.2 for more details.


Installation and Upgrading

Just refer to the “Installation and Upgrading” section above for install instructions, you just have to use the tarball of the final release instead :ok_hand:

However, if you’re currently running v1.0.0-beta.1, you MUST upgrade to v1.0.0-beta.2 first. Also see the announcement of v1.0.0-beta.2.


@rakekniven: This was actually the announcement for beta testers only, I was about to write a “real” announcement today :smile: But thank you anyway! I simply edited my post in the split up news thread :+1:

I have probably a newbie question about theming in the Nextcloud Pico CMS app: If I want to install e.g. the https://github.com/BesrourMS/story theme, on github it requires some config.php changes:

$config[‘theme’] = ‘story’;
$config[‘pages_order_by’] = ‘date’;
$config[‘pages_order’] = ‘desc’;
$config[‘PicoExcerpt.enabled’] = true;
$config[‘excerpt_length’] = 12;

In which file do I have to add these entries and also where in the file?

Welcome to Nextcloud Help @held! :slightly_smiling_face:

There’s no per-website config file yet (but there’s an feature request for it, see https://github.com/nextcloud/cms_pico/issues/30), but a global one that works on a global basis (i.e. for all websites). This might not be what you actually want.

You can find said global config file at data/appdata_*/cms_pico/config - simply create a empty config.yml in this directory. You can use config.yml.template as a basis. In Pico CMS for Nextcloud you don’t have to change the theme config; simply add the story theme as custom theme using the app’s admin interface and choose your websites to use this theme. Also add the custom PicoExcerpt plugin using the app’s admin interface. Then add the following to your global config.yml:

pages_order_by: date
pages_order: desc
PicoExcerpt.enabled: true
excerpt_length: 12

Hey, thanks for your answer! I Think that should be added to the official app docu, right? For me it wasn’t that obvious. Global config is currently ok for me, but per website would be even better.

To stay at that specific theme, some new questions pop up:

1st two plugins are needed (PicoExcerpt and PicoParsePagesContent) and both tell me This plugin exists for historic reasons only and should not be used!. What’s up there?

2nd URL image loading does not work. E.g. story does provide a sample page that refers to images which are stored on another server and which are brought to the index.md etc just by writing the image URL. Is that a theme problem, a pico-cms nextcloud app problem or a webserver problem?

1st two plugins are needed (PicoExcerpt and PicoParsePagesContent) and both tell me This plugin exists for historic reasons only and should not be used! . What’s up there?

Exactly what is written there: They should no longer be used since they exist for historic reasons only. You could simply remove the use of excerpts in the theme and use the alternative as shown in the README.md of PicoExcerpt. Please keep in mind that this is a 3rd party theme, thus we can’t really provide any support for it. But you can still ask the theme developer whether he updates his theme.

2nd URL image loading does not work. E.g. story does provide a sample page that refers to images which are stored on another server and which are brought to the index.md etc just by writing the image URL. Is that a theme problem, a pico-cms nextcloud app problem or a webserver problem?

That’s not possible with Pico CMS for Nextcloud due to security reasons. You must host all images locally.

Thanks a lot for this work.

I “think” I upgraded to the beta1 and should then go first to beta2, but I do not know what I did.

Is there some way to find out which is the current version other than from the NC user interface? Any specific filenumber or something in the installation that can show me?

May I just remove the present version including all files from from the app-folder and then reinstall the latest version as an alternative ?

You can check the app’s appinfo/info.xml. If it shows <version>1.0.0</version>, it might actually be v1.0.0-beta.1 due to the issue mentioned a few posts before. You can validate that by checking whether the file lib/Migration/Version010000From000908.php exists. If it exists, it’s indeed v1.0.0, otherwise it’s v1.0.0-beta.1.

If you want to wipe cms_pico from your Nextcloud without using Nextcloud’s UI, remove the directories apps/cms_pico/ as well as data/appdata_*/cms_pico/ and clean up your database by executing the following SQL queries:

DELETE FROM oc_appconfig WHERE appid = 'cms_pico';
DELETE FROM oc_migrations WHERE app = 'cms_pico';
DROP TABLE oc_cms_pico_websites;

Thank you. I have only four php files in /var/www/Pico/lib/
AbstractPicoPlugin.php, Pico.php, PicoPluginInterface.php and PicoTwigExtension.php
No Migration folder. So this is version1.0.0-beta 1.

From your answer I wonder if it will be enough just to inactiavte and remove the current PicoCMS using Nextcloud’s UI. I can easily also delete the Pico-folder but the SQL stuff is a bit more complicated. Do I need to execute the SQL queries? Or what is the easiest way to proceed from my situation?

Thank you. I have only four php files in /var/www/Pico/lib/
AbstractPicoPlugin.php, Pico.php, PicoPluginInterface.php and PicoTwigExtension.php

That’s not Pico CMS for Nextcloud at all, that’s just plain Pico.

OK. I have an old installation also, apparently located in /var/www/Pico/lib/. Should I remove those folders?

I also found this /var/www/nextcloud/apps/cms_pico/lib/Migration/Version010000.php
So it seems I have the true v 1.0.0! Very nice. So I have the latest version, and can proceed and install the v1.0.1 when it comes.

When upgrading the app to 1.0.1 from the userinterface I got an error and the NC stopped in maintenance mode.

I did /var/www/nextcloud$ sudo -u www-data php occ maintenance:repair

Among the lines I got this:

  • Preparing app data of Pico CMS for Nextcloud
    • Checking Pico CMS requirements …
    • Syncing Pico CMS app data folder …
    • Copying Pico CMS config …
    • WARNING: Replacing Pico CMS config file “config.yml.template”
    • Registering Pico CMS templates …
    • Adding Pico CMS system template “empty”
    • Adding Pico CMS system template “sample_pico”
    • Keeping Pico CMS custom template “empty-v0.9”
    • Keeping Pico CMS custom template “sample_pico-v0.9”
    • Publishing Pico CMS themes …
    • WARNING: Replacing Pico CMS system theme “default”
    • Publishing Pico CMS plugins …
    • Adding Pico CMS system plugin “PicoDeprecated”

Did
/var/www/nextcloud$ sudo -u www-data php occ app:disable cms_pico

After that I could access NC.
Found cms_pic version 1.0.1 as inactive app in the list of apps. Activated and now it seems OK.

I guess something is wrong - maybe because of the old install?

I did that
Deaktivated and removed Pico CMS app from NC user interface
Removed the old installation found at /var/www/Pico via the terminal
entered the database sudo mysql -h localhost -u myusername -p mydatabasename

and did
DELETE FROM oc_appconfig WHERE appid = ‘cms_pico’;
DELETE FROM oc_migrations WHERE app = ‘cms_pico’;
DROP TABLE oc_cms_pico_websites;

Then reinstalled Pico CMS via the NC user interface from apps/social

Worked very well. Have now Pico CMS 1.0.1

Can’t see any issue, aside from that NC shouldn’t remain in maintenance mode. The warnings will be shown on every update of Pico CMS for Nextcloud, they just inform you that system themes/plugins/themes are managed by the app and due to this might change behavior with any update.