fix エントリーリスト取得条件のデフォルト値追加と、currentContentが取得できていない問題を解消#4257
Merged
ryuring merged 1 commit intobaserproject:5.1.xfrom Sep 10, 2025
Merged
fix エントリーリスト取得条件のデフォルト値追加と、currentContentが取得できていない問題を解消#4257ryuring merged 1 commit intobaserproject:5.1.xfrom
ryuring merged 1 commit intobaserproject:5.1.xfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR fixes issues with custom content entry list retrieval by adding default values for query conditions and resolving a problem where currentContent was not being properly set.
- Adds default values for entry status (publish), order (created), and direction (DESC)
- Sets currentContent in the request to ensure proper context availability
- Ensures only published entries are shown by default and displays them in descending order by creation date
Comment on lines
+519
to
+520
| $request = $this->getView()->getRequest()->withAttribute('currentContent', $content); | ||
| $this->getView()->setRequest($request); |
There was a problem hiding this comment.
[nitpick] Creating a new request object just to set an attribute and then replacing the view's request could be simplified. Consider using a more direct approach if the framework provides one, or at minimum add a comment explaining why this pattern is necessary.
Collaborator
|
@norimine11 ありがとうございます、マージしますね |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@ryuring
以下のように修正しました!
レビューお願いします!
・デフォルトで公開状態のエントリーのみを取得する
・デフォルトで最新のエントリーから表示する
・エントリーリスト取得時にcrrentContentをセットする