Skip to content

Conversation

@BentiGorlich
Copy link
Member

  • pass the criteria through to match child comments by it
  • included criteria:
    • ordering
    • banned hashtag checking
    • preferred languages
    • federation filter (not used with comments, but still included)
    • time filter (also not used for comments atm)
  • filter out comments from banned authors

Closes #1397

- pass the criteria through to match child comments by it
- included criteria:
  - ordering
  - banned hashtag checking
  - preferred languages
  - federation filter (not used with comments, but still included)
  - time filter (also not used for comments atm)
- filter out comments from banned authors
@BentiGorlich BentiGorlich added enhancement New feature or request backend Backend related issues and pull requests api API related issues and pull requests labels Apr 16, 2025
@BentiGorlich BentiGorlich added this to the v1.8.2 milestone Apr 16, 2025
@BentiGorlich BentiGorlich self-assigned this Apr 16, 2025
- the user overview's comments tab threw an error because no criteria was supplied
- one place in the `PostCommentsRetrieveApi` had a missing parameter
@melroy89 melroy89 modified the milestones: v1.8.2, v1.8.3 Apr 17, 2025
- bring back the comment hydration. It reduces the number of queries especially on a highly commented post quite a bit.
- Use hydration in the `PostSingleController` and the `EntrySingleController` as well
- fix the `EntryCommentViewController` which did not pass the criteria parameter
Because we have a bit more complex orderings I switched from the `Criteria::orderBy` which does not support mathematical operations between multiple fields as orderings to `uasort`. This should not come with a performance impact, as the doctrine way also just does a `uasort` for all orderings. I just recreated the ordering from the `EntryCommentRepository::filter` method
@BentiGorlich
Copy link
Member Author

BentiGorlich commented Apr 30, 2025

- use `hydrateChildren` in the `EntrySingleController` and the `PostSingleController`
- use hydration in the `EntryCommentViewController`
- add `hydrateChildren` to the `PostCommentRepository`
@BentiGorlich BentiGorlich enabled auto-merge (squash) April 30, 2025 18:20
@BentiGorlich BentiGorlich merged commit 05229f2 into main Apr 30, 2025
7 checks passed
@BentiGorlich BentiGorlich deleted the new/comment-reply-sorting-and-filtering branch April 30, 2025 18:39
@melroy89
Copy link
Member

melroy89 commented May 9, 2025

I'm getting this weird error with Docker now. When I try to use ./docker/setup.sh dev localhost

I did change the docker image to the main tag: ghcr.io/mbinorg/mbin:main in my compose.yaml.

But when running:

docker compose up -d

I see:

In FileLoader.php line 356:
                                                                               
  Expected to find class "App\Utils\ArrayUtils" in file "/app/src/Utils/Array  
  Utils.php" while importing services from resource "../src/", but it was not  
   found! Check the namespace prefix used with the resource.                   
                                                                               


In FileLoader.php line 177:
                                                                               
  Expected to find class "App\Utils\ArrayUtils" in file "/app/src/Utils/Array  
  Utils.php" while importing services from resource "../src/", but it was not  
   found! Check the namespace prefix used with the resource in /app/config/se  
  rvices.yaml (which is being imported from "/app/src/Kernel.php").            
                                                                               

In FileLoader.php line 356:
                                                                               
  Expected to find class "App\Utils\ArrayUtils" in file "/app/src/Utils/Array  
  Utils.php" while importing services from resource "../src/", but it was not  
   found! Check the namespace prefix used with the resource.                   

Any clue?

EDIT: Let me try to comment out the image line totally from the compose.yaml. So it will build the image from scratch using the docker/Dockerfile.

Nope.. same issue:

In FileLoader.php line 177:
                                                                               
  Expected to find class "App\Utils\ArrayUtils" in file "/app/src/Utils/Array  
  Utils.php" while importing services from resource "../src/", but it was not  
   found! Check the namespace prefix used with the resource in /app/config/se  
  rvices.yaml (which is being imported from "/app/src/Kernel.php").            
                                                                               

In FileLoader.php line 356:
                                                                               
  Expected to find class "App\Utils\ArrayUtils" in file "/app/src/Utils/Array  
  Utils.php" while importing services from resource "../src/", but it was not  
   found! Check the namespace prefix used with the resource.                   

@BentiGorlich
Copy link
Member Author

As far as I know it is the autoloader generated by composer that fucked up... So rerun composer install and restarting php to clear out opcache should fix it

@melroy89
Copy link
Member

melroy89 commented May 9, 2025

As far as I know it is the autoloader generated by composer that fucked up... So rerun composer install and restarting php to clear out opcache should fix it

This is what the script should do by default in docker. Right @jwr1? It seems we missed something with the docker setup.

@BentiGorlich
Copy link
Member Author

I thought that that fixed it for me locally when I was developing (also with docker)... Not sure how I fixed it if it was not with these commands...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api API related issues and pull requests backend Backend related issues and pull requests enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Blocked users' comments still visible in the Interstellar app

3 participants