Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Folders are collapsed on page reload #1040

Closed
3 tasks done
v1r0x opened this issue Jan 13, 2021 · 2 comments · Fixed by #1041
Closed
3 tasks done

Folders are collapsed on page reload #1040

v1r0x opened this issue Jan 13, 2021 · 2 comments · Fixed by #1041
Labels

Comments

@v1r0x
Copy link

v1r0x commented Jan 13, 2021

IMPORTANT

Read and tick the following checkbox after you have created the issue or place an x inside the brackets ;)

  • I have read the CONTRIBUTING.md and followed the provided tips
  • I accept that the issue will be closed without comment if I do not check here
  • I accept that the issue will be closed without comment if I don not fill out all items in the issue template.

Explain the Problem

What problem did you encounter?

When the news app is (re)loaded all folders are collapsed.
I'm not sure if this behaviour is intended, but I couldn't find anything in commit messages or the changelog.

Steps to Reproduce

Explain what you did to encounter the issue

  1. Open news app
  2. Open different folders
  3. Reload news app
  4. All folders are collapsed again

System Information

  • News app version: 15.1.1
  • Nextcloud version: 20.0.1
  • Cron type: System-Cron
  • PHP version: 7.4.11
  • Database and version: MariaDB 10.5.6
  • Browser and version: Firefox 84.0.2
  • Distribution and version: Ubuntu 20.04 LTS
@v1r0x v1r0x added the bug label Jan 13, 2021
@anoymouserver
Copy link
Contributor

Can confirm and I don't think it's intended.
I can fix the opened state locally with the following, but I don't know whether it's the right place, whether it has side-effects and which other data were returned in older versions.

diff --git a/lib/Db/Folder.php b/lib/Db/Folder.php
index d452bb7d4..6f208309b 100644
--- a/lib/Db/Folder.php
+++ b/lib/Db/Folder.php
@@ -167,6 +167,7 @@ class Folder extends Entity implements IAPI, \JsonSerializable
             [
                 'id',
                 'name',
+                'opened',
                 'feeds'
             ]
         );

It probably changed in 8abddea with the switch to $this->serialize(). Any idea @SMillerDev?

return ['folders' => $this->serialize($folders)];

@SMillerDev
Copy link
Contributor

It seems like earlier versions didn't serialize the folder because there is barely any data in there. I'd say that is the right fix @anoymouserver

Grotax added a commit that referenced this issue Jan 17, 2021
Fixed
- opened state of folders is not restored (#1040)
- Argument 3 passed to OCA\News\Db\ItemMapper::makeSelectQuery() must be of the type bool, array given (#1044)
- Argument 2 passed to OCA\News\Db\ItemMapper::findAllNewFeed() must be of the type int, string given (#1049)

Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
Grotax added a commit that referenced this issue Jan 17, 2021
Fixed
- opened state of folders is not restored (#1040)
- Argument 3 passed to OCA\News\Db\ItemMapper::makeSelectQuery() must be of the type bool, array given (#1044)
- Argument 2 passed to OCA\News\Db\ItemMapper::findAllNewFeed() must be of the type int, string given (#1049)

Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
mnassabain pushed a commit to Team-Forward/news that referenced this issue Mar 1, 2021
Fixed
- opened state of folders is not restored (nextcloud#1040)
- Argument 3 passed to OCA\News\Db\ItemMapper::makeSelectQuery() must be of the type bool, array given (nextcloud#1044)
- Argument 2 passed to OCA\News\Db\ItemMapper::findAllNewFeed() must be of the type int, string given (nextcloud#1049)

Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
mnassabain pushed a commit to Team-Forward/news that referenced this issue Mar 1, 2021
Fixed
- opened state of folders is not restored (nextcloud#1040)
- Argument 3 passed to OCA\News\Db\ItemMapper::makeSelectQuery() must be of the type bool, array given (nextcloud#1044)
- Argument 2 passed to OCA\News\Db\ItemMapper::findAllNewFeed() must be of the type int, string given (nextcloud#1049)

Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
mnassabain pushed a commit to Team-Forward/news that referenced this issue Mar 1, 2021
Fixed
- opened state of folders is not restored (nextcloud#1040)
- Argument 3 passed to OCA\News\Db\ItemMapper::makeSelectQuery() must be of the type bool, array given (nextcloud#1044)
- Argument 2 passed to OCA\News\Db\ItemMapper::findAllNewFeed() must be of the type int, string given (nextcloud#1049)

Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
Neo11 pushed a commit to Neo11/news that referenced this issue May 28, 2022
Fixed
- opened state of folders is not restored (nextcloud#1040)
- Argument 3 passed to OCA\News\Db\ItemMapper::makeSelectQuery() must be of the type bool, array given (nextcloud#1044)
- Argument 2 passed to OCA\News\Db\ItemMapper::findAllNewFeed() must be of the type int, string given (nextcloud#1049)

Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants