- Issue created by @mglaman
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Update `\Drupal\experience_builder\Controller\ApiContentControllers::list` to read a `search` query parameter and do a `LIKE` query on the `label` entity key.
If only we had
QUERY
!But at least in this case, the querystring itself should be comparatively tiny, so
?search=hello%20world
will do just fine 👍Note:
ApiContentControllers::list()
may end up finding hundreds of matches. But the API response does not yet support pagination. Thoughts? - 🇺🇸United States mglaman WI, USA
But the API response does not yet support pagination. Thoughts?
Technically it'd still be a subset of the default result without a query string. But I do think getting pagination is going to become important pretty soon
- First commit to issue fork.
- Merge request !887Issue #3518292 Author should be able to search pages by name in navigation → (Merged) created by deepakkm
- 🇬🇧United Kingdom catch
I'm a bit confused why this is a 1.0 blocker, there's already ways to search for content in Drupal. Where are the requirements for this feature documented?
- 🇫🇮Finland lauriii Finland
Linking designs from ✨ Create a navigation modal for changing pages in the editor Active .
- 🇮🇳India deepakkm
created to separate ticket to cover autocomplete feature - https://www.drupal.org/project/experience_builder/issues/3522488 🐛 Entity saved with autosaved data is not respected Active
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
#19: @deepakkm: Please see my response at 🐛 Entity saved with autosaved data is not respected Active , can you please clarify it?
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
The
List with search
test case ofApiContentControllersList
has been failing.Also: I found a pretty massive bug which indicates the current test coverage is not adequate.
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
I know the sense of urgency y'all were under, so I spent ~30 mins reviewing this during my PTO today.
This MR is unfortunately not at all ready.
- The tests are still hard failing on SQLite and PostgreSQL. You didn't implement what we agreed upon on Wednesday.
navigation.cy.js
is consistently failing on the new test coverage, even after I re-tested it.- The information disclosure security vulnerability I pointed out on May 8 is still present, and the review thread was closed with a non-explanation 😅
… and that's just the big ones. There's plenty of smaller concerns, most of which I pointed out long ago. I have not yet re-reviewed all closed MR threads, because a bunch seem to have been closed prematurely 🙈
- Assigned to deepakkm
- Status changed to Needs work
about 1 month ago 7:17am 16 June 2025 - 🇮🇳India deepakkm
Mostly covered everything, but in case something is left do let me know.
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Did a high-level review. Addressed all my own nits. Since this touches auto-save things I'd like that to be reviewed by @tedbow or @larowlan.
And I'd definitely like @larowlan to do a thorough review of the changes to
ApiContentControllers
- 🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10
Addressed the test fails and remaining items I could.
There are 3 items left that I'm not sure about but @deepakkm is best placed to answer
1 of them I think is already handled in a follow-up
The other two I'm not sure of the status/reasoning - 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
wim leers → changed the visibility of the branch 0.x to hidden.
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
wim leers → changed the visibility of the branch 3532268-xbs-testsite-recipe to hidden.
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
I wanted to review, RTBC and merge this, but found myself unable to — so I spent a few hours getting this ready for commit.
Searching article nodes (which have XB fields and are editable in XB) did not work yet. And that's apparently intentional; but the route definition does not make that clear, nor does the bounds checking. Hardened that, to pave a clearer path for #3498525.
Most importantly: the logic in
\Drupal\experience_builder\Controller\ApiContentControllers::list()
would've made XB harder to maintain, because its complexity was disproportionate to the functionality it provided: it was very complicated, not helped by the 8 (!!!) helper methods, incorrectly named variables and unfortunately about a dozen small bugs that made it even harder to understand. 🫣Before vs after: improved maintainability and quite literally a simpler MR:
src/Controller/ApiContentControllers.php | 192 +++++++++++-------------------- 1 file changed, 69 insertions(+), 123 deletions(-)
(See attached diff. @deepakkm, I hope you find the sequence of commits I pushed to this MR useful as a reference in the future. I tried many times to express this in MR comments, but I seem to have failed to convey my message. This is probably the only MR with >200 comment threads. Given this MR needs to land before 🌱 Milestone 1.0.0-beta1: Start creating non-throwaway sites Active , and the GitLab UI is starting to struggle to still load at all, I figured it's reasonable for me to step in and show by example what I failed to convey in my review comments.)
Landed this despite one known bug: 🐛 Fix front-end performance and scalability of search functionality in navigator Active
Also ran into a pre-existing bug: #3529924-17: Add access check for using Experience Builder at all: if >=1 content entity type with an XB field can be created or edited. → .
-
wim leers →
committed f3ca3ddf on 0.x authored by
deepakkm →
Issue #3518292 by deepakkm, wim leers, larowlan, mglaman: Allow...
-
wim leers →
committed f3ca3ddf on 0.x authored by
deepakkm →
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Also, as described at #3522488-3: Follow-up for #3518292: `ApiContentControllers::list()`: search should exclude entity query matches for entities with auto-save data → , I don't understand what that issue is about, so I requested failing tests to illustrate the problem @deepakkm spotted 🙏
That means there's now 2 follow-ups for this that are now unblocked:
- 🐛 Entity saved with autosaved data is not respected Active
- 🐛 Fix front-end performance and scalability of search functionality in navigator Active
🚀
Glad to have this in, it works great! 🤩
Automatically closed - issue fixed for 2 weeks with no activity.