Opened 8 years ago
Last modified 6 months ago
#42910 reopened defect (bug)
Default Post Format doesn't apply on post created from Quick Draft
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Future Release | Priority: | normal |
| Severity: | normal | Version: | 4.9.1 |
| Component: | Post Formats | Keywords: | has-test-info has-unit-tests has-patch dev-feedback needs-dev-note |
| Focuses: | administration | Cc: |
Description
Default Post Format doesn't keep selected while submitting posts using Quick Draft option of dashboard.
Steps To Reproduce:
- Login into the WordPress admin
- Navigate to the Settings > Writing
- Change the Default Post Format to any format
- Clicked on ‘Save changes’ button
- Now navigate to the Dashboard
- Inside Quick Draft block Add post title and description and Clicked on ‘Save Draft’.
- Now check the post format of added post.
Note: it is working after 2-3 attempt but when you again change the post format then it will not work as expected.
Expected result: default post format should be applied on post created from "Quick Draft" option.
Attachments (3)
Change History (25)
#5
@
8 years ago
- Keywords needs-testing added
- Resolution set to invalid
- Status changed from reopened to closed
#7
follow-ups:
↓ 10
↓ 11
@
7 months ago
- Milestone changed from Awaiting Review to Future Release
The Quick Draft still does not acknowledge the default format change until the second draft with WordPress 6.8.1. With the patch, it honored the new default with the first draft.
However, I would like to know how it worked with the second draft (before the patch).
#8
@
7 months ago
- Keywords has-test-info dev-feedback added; needs-testing removed
Test Report
Description
✅ This report validates that the indicated patch works as expected.
Patch tested: https://core.trac.wordpress.org/attachment/ticket/42910/42910.1.patch
Environment
- WordPress: 6.9-alpha-60093-src
- PHP: 8.4.6
- Server: nginx/1.27.5
- Database: mysqli (Server: 8.4.5 / Client: mysqlnd 8.4.6)
- Browser: Chrome 136.0.0.0
- OS: Windows 10/11
- Theme: Twenty Twenty-Five 1.2
- MU Plugins: None activated
- Plugins:
- Test Reports 1.2.0
Actual Results
- ✅ Issue resolved with patch.
Additional Notes
- Tested using OP testing instructions
#9
@
6 months ago
Test Report
Description
This report validates whether the indicated patch works as expected.
Patch tested: Patch-4291.1.patch
Environment
- WordPress: 6.9-alpha-60093-src
- PHP: 8.2.28
- Server: nginx/1.27.5
- Database: mysqli (Server: 8.4.5 / Client: mysqlnd 8.2.28)
- Browser: Firefox 139.0
- OS: Windows 10/11
- Theme: Twenty Twenty-Five 1.2
- MU Plugins: None activated
- Plugins:
- Test Reports 1.2.0
Actual Results
- ✅ Issue resolved with patch.
Additional Notes
- Before applying the patch, changed the Default Post Format under General -> Writing menu to 'Quote' and after saving 'Quick Draft', it was changed to 'Standard'.
- After applying patch, it worked as expected and didn't change under Quick draft.
Supplemental Artifacts
Test results after patch: Video
#10
in reply to:
↑ 7
@
6 months ago
Replying to sabernhardt:
The Quick Draft still does not acknowledge the default format change until the second draft with WordPress 6.8.1. With the patch, it honored the new default with the first draft.
After the patch, Quick Draft is recognizing the default format change with both the drafts.
However, I would like to know how it worked with the second draft (before the patch).
Before the patch, Quick draft was only acknowledging the second draft. See this: before the patch Video.
#11
in reply to:
↑ 7
;
follow-up:
↓ 12
@
6 months ago
- Keywords needs-test-info added; has-test-info dev-feedback removed
Replying to sabernhardt:
The Quick Draft still does not acknowledge the default format change until the second draft with WordPress 6.8.1. With the patch, it honored the new default with the first draft.
However, I would like to know how it worked with the second draft (before the patch).
I can't understand your concerns. Can you explain me how to reproduce what you mention here?
#12
in reply to:
↑ 11
;
follow-up:
↓ 13
@
6 months ago
Replying to SirLouen:
I can't understand your concerns. Can you explain me how to reproduce what you mention here?
I think I have reproduced @sabernhardt's concerns related to before-the-patch here and after-the-patch results.
Please first watch these two videos and then you will understand the comment.
#13
in reply to:
↑ 12
@
6 months ago
- Keywords has-test-info added; needs-test-info removed
Replying to sandeepdahiya:
Please first watch these two videos and then you will understand the comment.
Thanks! Now it makes all sense to me. I knew that @sabernhardt never gives a free launch, so I was curious about his concern. Now it makes sense to me to understand what's going on here.
This ticket was mentioned in PR #8936 on WordPress/wordpress-develop by @SirLouen.
6 months ago
#14
- Keywords has-unit-tests added
The post_type was never been set in during the wp_dashboard_quick_press but in that function, there is a mechanism that replicates all the information from the last post, this was the reason it was not set during the initial creation but set during the second
I've added a new patch that more adequately solves this problem within where it should actually be (in the wp_dashboard_quick_press) including some unit testing coverage to check if the wp_dashboard_quick_press is displaying what it should be displaying.
@sandeepdahiya if you can test this new patch version again, it would be great.
Trac ticket: https://core.trac.wordpress.org/ticket/42910
#16
@
6 months ago
- Keywords dev-feedback added; needs-testing removed
Test Report
Description
✅ This report validates that the indicated patch works as expected.
Patch tested: Patch-8936.diff
Environment
- WordPress: 6.9-alpha-60093-src
- PHP: 8.2.28
- Server: nginx/1.27.5
- Database: mysqli (Server: 8.4.5 / Client: mysqlnd 8.2.28)
- Browser: Firefox 139.0
- OS: Windows 10/11
- Theme: Twenty Twenty-Five 1.2
- MU Plugins: None activated
- Plugins:
- Test Reports 1.2.0
Actual Results
- ✅ Issue resolved with patch and Quick draft feature is working as expected. After the patch video
- ✅ All unit tests in includesDashboard.php passed successfully.
$ npm run test:php -- tests/phpunit/tests/admin/includesDashboard.php > WordPress@6.9.0 test:php > node ./tools/local-env/scripts/docker.js run --rm php ./vendor/bin/phpunit tests/phpunit/tests/admin/includesDashboard.php Installing... Running as single site... To run multisite, use -c tests/phpunit/multisite.xml Not running ajax tests. To execute these, use --group ajax. Not running ms-files tests. To execute these, use --group ms-files. Not running external-http tests. To execute these, use --group external-http. PHPUnit 9.6.23 by Sebastian Bergmann and contributors. Warning: Your XML configuration validates against a deprecated schema. Suggestion: Migrate your XML configuration using "--migrate-configuration"! . 1 / 1 (100%) Time: 00:00.545, Memory: 38.50 MB OK (1 test, 2 assertions)
Additional Notes
This ticket was mentioned in Slack in #core by sirlouen. View the logs.
6 months ago
#18
@
6 months ago
- Keywords changes-requested needs-unit-tests needs-patch added; has-patch has-unit-tests dev-feedback removed
As per todays <bug-scrub> one idea has arisen to improve the current state of the plugin.
Instead of fixing the default post format to the wp_dashboard_quick_press, it can be amended within the AJAX call on submit. This could help for extensibility purposes (for example, if someone is willing to set a default post format, just for the quick press widget)
The problem here is that unit tests need to be moved from PHPUnit to Playwright to automatically deliver a draft and check on the fly if the default post format is being set and/or (extra credits) a custom default format could be set.
Based on this information, please take this PR as a reference
#19
@
6 months ago
- Keywords has-unit-tests has-patch added; changes-requested needs-unit-tests needs-patch removed
There is an error in PHPUnit that I cannot reproduce
> WordPress@6.9.0 test:php > node ./tools/local-env/scripts/docker.js run --rm php ./vendor/bin/phpunit --filter WP_Customize_Nav_Menus::test_available_item_types Installing... Running as single site... To run multisite, use -c tests/phpunit/multisite.xml Not running ajax tests. To execute these, use --group ajax. Not running ms-files tests. To execute these, use --group ms-files. Not running external-http tests. To execute these, use --group external-http. PHPUnit 9.6.23 by Sebastian Bergmann and contributors. Warning: Your XML configuration validates against a deprecated schema. Suggestion: Migrate your XML configuration using "--migrate-configuration"! . 1 / 1 (100%)
In fact, this is not something I'm manipulating in the patch.
Wondering what's going on here.
This ticket was mentioned in Slack in #core by sirlouen. View the logs.
6 months ago
This ticket was mentioned in Slack in #core by sirlouen. View the logs.
6 months ago
#22
@
6 months ago
- Keywords dev-feedback needs-dev-note added
6.9.0 Milestone proposed during today's <bug-scrub>
More information
Dashboard Quick Draft