Making WordPress.org

Opened 7 years ago

Closed 6 years ago

#3019 closed defect (bug) (fixed)

Searching dynamic hooks returns no results

Reported by: ocean90's profile ocean90 Owned by: coffee2code's profile coffee2code
Milestone: Priority: normal
Component: Developer Hub Keywords: needs-patch
Cc:

Description

I entered rest_{ in the search field and got an autocomplete for rest_{$this->post_type}_query. But the search returns no results for this query.

Related: #686, #557

Change History (6)

#1 @pbiron
7 years ago

I'm seeing this too. However, it isn't all searches for dynamic hooks.

Doing a few "random" searches for dynamic hooks suggests that the problem only surfaces when the search contains $object->.

For instance:

  • {$old_status}_to_{$new_status} works
  • term_{$field} works
  • manage_{$screen->id}_columns does NOT work
  • rest_{$this->post_type}_query does NOT work

The odd thing is that it works correctly on my local clone of the Code Reference (I did an SVN update on wporg-developer this morning, so my local has the latest code).

Hope the above helps someone track down the problem.

#2 follow-up: @ocean90
7 years ago

@pbiron Nice research, it's only about the >. A search for rest_{$this->post_type}_query does work.

#3 in reply to: ↑ 2 @pbiron
7 years ago

Replying to ocean90:

@pbiron Nice research, it's only about the >. A search for rest_{$this->post_type}_query does work.

That's really odd, because that search does not work on my local clone...but yes, it does work on the real code reference :-(

#4 @keesiemeijer
7 years ago

My results are the same as @pbiron.

On my local machine the search for rest_{$this->post_type}_query works and is redirected to /reference/hooks/rest_this-post_type_query/
And the search for rest_{$this->post_type}_query does not work.

The only way I can replicate this issue locally is if I rename the post title to rest_{$this->post_type}_query in the database.

This ticket was mentioned in Slack in #meta-devhub by drew. View the logs.


6 years ago

#6 @coffee2code
6 years ago

  • Owner set to coffee2code
  • Resolution set to fixed
  • Status changed from new to closed

In 7827:

Developer: Rerun empty searches where the search term contains characters that can be converted to HTML entities, but with such characters converted.

Fixes #3019.

Note: See TracTickets for help on using tickets.