Hi,
First thanks for the very good work done on rc5, especially WYSIWYG support :)
Now I would like my users to have a WYSIWYG button to select a node in an autocomplete form and then insert in the textarea the title of the node, linked to the node : tag is [#NID]
It works well with "Create the taglist using a content type" but I would like to have all the content types. It works well with "Create the taglist using a view" but not for a basic view including all the published nodes. Maybe that view has too many results, hitting a hidden limit ?
I'd prefer to have a third option for the creation of content types, like "Create the taglist for all nodes" which would save lots of queries. Is it doable ?
Thanks for reading
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | linodef_taglists_autocomplete_maxlength.patch | 661 bytes | Roi Danton |
Comments
Comment #1
Roi Danton commentedA standard view should do it, you even need no view fields or a different display than "standard". Just make sure to set Items to display/Items per page: Unlimited since the view result array contains the first page (if pager is activated) only. The view I use for testing:
Regarding the feature request: The option "Create the taglist using a content type" should be expanded to "Create the taglist using content type(s)" so you can select more content types.
Comment #2
guillaumeduveauHi Roi, thanks for your answer. Before posting that issue I tried with a simple view like the one you posted, and I just tried with your view code but it doesn't work.
It does not work with the autocompletion widget, however it works with the dropdown list.
Comment #3
Roi Danton commentedMaxlength of the autocomplete form was set to 512. I have increased it to 8192. Please test if the patch solves your problem. Normally maxlength sets the amount of characters allowed in a textfield but I have no other reason found yet that could cause a limitation - so the patch is a guess in the dark.
Comment #4
Roi Danton commentedThe patch from #3 has no effect as expected. Also I couldn't reproduce the problem yet, using more than 500 nodes. How many items your view returns?
Comment #5
guillaumeduveauHello Roi, the view returns 1306 nodes. But it could be a really larger number (number of published nodes) on big sites, so I don't think a view is OK for performance here in that particular case ?
Comment #6
Roi Danton commentedWhen using the autocomplete widget and you want your users to be able to embed all of your nodes then all nodes have to be in the view even if your site has 1000000+ nodes - otherwise only a part of nodes can be selected. With 5000 nodes the performance should be okay. You just have to wait a little after entering a string.
I didn't do tests with 50000 or 500000 nodes. However in those use cases it would be meaningful to create a node view per year or divide them by categories or similar. So for each year you can create a taglist with the corresponding view.
Have you verified the bug with the autocompletion limit? I've created 2000 nodes and can select all of them with autocomplete.
Comment #7
Roi Danton commentedA view does not need more performance than my custom functions if this view contains no fields. However what also requires much performance is the script for the autocomplete form. I'm using strpos() to determine the matches, see linodef_taglists_autocomplete() in includes/pages.inc.
Any update regarding the limit issue?
Comment #8
guillaumeduveauHi Roi, sorry for not answering sooner. I tested with 1500 nodes both on a fresh Drupal install and a local copy of my website, and it works. So I have a problem somewhere with my production server... you can close that issue !
Comment #9
Roi Danton commentedOkay, thanks for replying! I mark it as fixed so - if somebody detects similar problems - it is visible in the issue queue for a while.