Make WordPress Core

Opened 2 days ago

Closed 31 hours ago

#65189 closed defect (bug) (invalid)

create pattern issue

Reported by: sonaliprajapati's profile sonaliprajapati Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: General Keywords:
Focuses: Cc:

Description

When I try to create a pattern, it doesn’t get created successfully. Instead, it throws an error.

https://prnt.sc/WamFt98ubM_7

Change History (2)

#1 @darshitrajyaguru97
2 days ago

I tested this issue further directly on the WordPress.org Pattern Creator and was able to consistently reproduce it.

Testing Performed

  • Opened the WordPress.org Pattern Creator
  • Created a new pattern with all required information
  • Submitted the pattern normally

Observed Behavior

  • After submission, a “Thank you for submit” message appears briefly
  • A few seconds later, the editor shows an error state, and the pattern is not created successfully

"There is an issue with your pattern.
Updating failed. Sorry, you are not allowed to edit the jetpack_post_was_ever_published custom field."

Console / Network Findings

On further inspection in the browser console and network tab, several REST/API-related issues appeared during the submission process.

Most relevant finding:

POST https://wordpress.org/patterns/wp-json/wp/v2/users/me?_locale=user 404 (Not Found)

Additionally:

wp-json/wp/v2/media?... 403 (Forbidden)
wp-json/wp/v2/wporg-pattern/{id}?_locale=user 403 (Forbidden)

There are also multiple async/runtime listener errors and failed resource requests occurring after submission.

Notes

  • Issue tested directly on WordPress.org Pattern Creator (not local environment)
  • Reproducible consistently
  • Tested in Chrome on Windows
  • The pattern submission initially appears successful before failing during subsequent API/editor requests

Based on the testing, this may be related to:

  • REST API routing
  • Authentication/nonce handling
  • Permission validation
  • Post-submit editor requests on WordPress.org infrastructure

The users/me request returning 404 and related 403 API responses may help identify the root cause.

#2 @wildworks
31 hours ago

  • Focuses coding-standards removed
  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

Hi @sonaliprajapati, the reason for that error is that the word "wordpress" is included in the title. Please look at this code.

https://github.com/WordPress/pattern-directory/blob/416e65f748e0159f94b710c3f242776438a25721/public_html/wp-content/plugins/pattern-directory/includes/pattern-validation.php#L427-L429

In any case, this is not an issue with the WordPress core.

Note: See TracTickets for help on using tickets.