nextcloud / news

:newspaper: RSS/Atom feed reader
https://apps.nextcloud.com/apps/news
GNU Affero General Public License v3.0
854 stars 182 forks source link

[WORKAROUND] Running News 24.x under Nextcloud 28+, revisited #2703

Open Yetangitu opened 2 months ago

Yetangitu commented 2 months ago

Since the original entry was closed somewhat prematurely and News 25.x has not reached a level of usability on par with News 24.x yet here's a continuation of #2610 with some more fixes for problems which do pop up every now and then. This is NOT a bug report but I can not remove the bug label myself.

For those who want to use News 24.x with Nextcloud 28+ please refer to the instructions in #2610 on how to achieve this first, this continuation only covers problems which popped up after that entry was closed and locked. Thus far there has only been a single problem in combination with another app - which in itself is a sign of something being amiss since the install of app A should not limit the functionality of app B - but that may change at a later stage or in a later continuation.

1: No feed icons

If you're using News 24.x under Nextcloud 28+ in combination with the richdocuments app you may notice that the feed icons in News are missing which makes it rather hard to peruse your feed list. This is caused by the richdocuments app adding a few http headers which keep your browser from loading those icons:

Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Embedder-Policy: require-corp

These headers are added in apps/richdocuments/lib/Listener/BeforeTemplateRenderedListener.php, lines 25-28:

                if ($this->capabilitiesService->hasWASMSupport()) {
                        $event->getResponse()->addHeader('Cross-Origin-Opener-Policy', 'same-origin');
                        $event->getResponse()->addHeader('Cross-Origin-Embedder-Policy', 'require-corp');
                }

If you want your feed icons back you can comment out those lines. As to the fact that installing the richdocuments app causes other apps to fail in subtle ways I consider this to be a bug but it is unclear whether it is a bug in richdocments or in Nextcloud. Those headers should only be added when the richdocuments app is active (as in 'actively being used', not 'enabled through occ') but the way these headers are added makes them appear whenever Nextcloud is loaded.

mrtumnus commented 1 month ago

Note that the CSS files can be found in the Nextcloud server repository under the 27.1.11 tag: https://github.com/nextcloud/server/raw/v27.1.11/core/css/apps.css https://github.com/nextcloud/server/raw/v27.1.11/core/css/mobile.css

Thanks for this workaround! I just got used to only using the mobile app 🤣

bootlegcoal commented 5 days ago

Hi, I refitted this for the Custom CSS app. Added padding to list links and it looks pretty good to me. https://gist.github.com/bootlegcoal/2c45b723f9bdf3be048cc39019ba8f3a

mrtumnus commented 4 days ago

Hi, I refitted this for the Custom CSS app. Added padding to list links and it looks pretty good to me. https://gist.github.com/bootlegcoal/2c45b723f9bdf3be048cc39019ba8f3a

Did you mean to wrap the whole CSS file within the .app-news class? It looks like only the first two definitions are included in that class.

EDIT: Nevermind - I was misreading the curly braces :man_facepalming: