-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[6.0] Fixes the missing modified start and end date filter to articled API endpoint #45142
Merged
Conversation
This file contains 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
brianteeman
reviewed
Mar 15, 2025
administrator/components/com_content/src/Model/ArticlesModel.php
Outdated
Show resolved
Hide resolved
alikon
suggested changes
Mar 16, 2025
administrator/components/com_content/src/Model/ArticlesModel.php
Outdated
Show resolved
Hide resolved
alikon
reviewed
Mar 16, 2025
alikon
approved these changes
Mar 16, 2025
I have tested this item ✅ successfully on 2493253 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45142. |
I have tested this item ✅ successfully on 2493253 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45142. |
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45142. |
I have tested this item ✅ successfully on 2493253
|
During the build process off a new release or update we remove various files that should not or do not need to be distributed This PR extends the list of files to be removed from the libraries/vendor folder to include .drone.yml .drone.jsonnet Examples can be seen in most of the libraries/vendor/joomla folders Signed-off-by: BrianTeeman <[email protected]> Co-authored-by: Quy Ton <[email protected]>
Co-authored-by: Allon Moritz <[email protected]>
* Update php-tuf to version 5.3 * revert composer change
_this is an AI generated explanation_ The warning Only the first byte will be assigned to the string offset occurs because $temp1 is being treated as a string, and assigning a value to $temp1[$i] attempts to modify a specific character (byte) of the string. However, the value being assigned (random_int(0, 99999999)) is an integer, which is incompatible with this operation. Root Cause: In PHP, when you use array-like syntax (e.g., $temp1[$i]) on a variable that has not been explicitly declared as an array, PHP may treat it as a string. In this case, $temp1 is being treated as a string, and $temp1[$i] is interpreted as modifying a specific character of the string. Since random_int(0, 99999999) generates an integer, PHP raises a warning because you cannot assign an integer to a specific byte of a string. Fix: To resolve this issue, you need to explicitly declare $temp1 as an array before using it. This ensures that $temp1[$i] is treated as an array element rather than a string offset. Explanation of the Fix: Explicit Declaration: $temp1 = []; ensures that $temp1 is treated as an array from the start. This avoids PHP's automatic type juggling, which might treat $temp1 as a string if it is not explicitly declared. Assigning Values: $temp1[$i] = random_int(0, 99999999); now correctly assigns the random integer to the $ith index of the $temp1 array. Summary: This fix ensures that $temp1 is treated as an array, eliminating the warning and allowing the code to function as intended. Signed-off-by: BrianTeeman <[email protected]>
Don't use the deprecated CMS Filesystem but the framework package
Thank you @laoneo and the testers for all your work |
laoneo
added a commit
to Digital-Peak/joomla-cms
that referenced
this pull request
Mar 25, 2025
… articled API endpoint (joomla#45142)" This reverts commit 3e35108.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Composer Dependency Changed
Feature
NPM Resource Changed
This Pull Request can't be tested by Patchtester
PR-6.0-dev
Unit/System Tests
Webservices
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.
Summary of Changes
Adds two new filter options to the articles list endpoint. The new
modified_start
andmodified_end
filters do allow to fetch articles which are modified within a date range. This is a common use case in API's, as it allows consumers to fetch only the delta which has changed since the last sync and not always the full list of articles. The following example fetches only articles which are edited within February 2025:GET /api/index.php/v1/content/articles?filter[modified_start]=2025-02-01&filter[modified_start]=2025-02-28
Testing Instructions
Use tools like postman to execute the following curl command against the joomla installation with the patch:
curl -g "https://{web site}/api/index.php/v1/content/articles?filter[modified_start]=2025-02-01&filter[modified_start]=2025-02-28" -H "Authorization: Bearer {your token}"
Actual result BEFORE applying this Pull Request
All articles are returned.
Expected result AFTER applying this Pull Request
Only the article which was modified after the first February is returned.
Link to documentations
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed