Hi ezra-g,
I was thinking to create another sub-module for showing only published nodes in autocomplete while adding nodes in nodequeue.
But thought that if I can give a setting in nodequeue interface and do the same thing, if you are ok with this. Then there shouldn't be requirement of extra module.
I will submit a patch over here. After that, Please let me know about it.
Please do reply on this thread as this is very important for me. :)

Cheers,
Deepak Kumar

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

visabhishek’s picture

Status: Active » Needs review
FileSize
2.95 KB

I have created a patch for providing this facility from Admin UI.
Please Run Update and then visit Check "Show Only Published Node in Autocomplete" on
admin/structure/nodequeue/%/edit page.

Please review

Status: Needs review » Needs work
visabhishek’s picture

FileSize
2.55 KB
visabhishek’s picture

Version: 7.x-2.0-beta1 » 7.x-2.0
Status: Needs work » Needs review
FileSize
2.55 KB

Updated patch for Version: 7.x-2.0.

Please review

visabhishek’s picture

Configuration screenshot is attached for Show only Published nodes in autocomplete.

deepakaryan1988’s picture

Great but I have already published along back.
But if this feature is pushed to nodequeue, then I will remove my module with status that "this feature has implemented in new nodequeue version".

subhojit777’s picture

Version: 7.x-2.0 » 7.x-2.x-dev
subhojit777’s picture

Status: Needs review » Needs work

Patch in #4 is working. We need to update the patch based on the following:

  1. +++ b/includes/nodequeue.admin.inc
    @@ -444,6 +444,13 @@ function nodequeue_edit_queue_form($form, &$form_state, $queue) {
    +    '#title' => t('Show Only Published Node in Autocomplete'),
    

    Change this to "Allow only published nodes"

  2. +++ b/includes/nodequeue.admin.inc
    @@ -444,6 +444,13 @@ function nodequeue_edit_queue_form($form, &$form_state, $queue) {
    +    '#description' => t('Ordinarily queues are Showing all nodes, But when you check this then it will show only published node in Autocomplete.'),
    

    I think we don't require this. The new title itself tells it's purpose.

  3. +++ b/includes/nodequeue.admin.inc
    @@ -444,6 +444,13 @@ function nodequeue_edit_queue_form($form, &$form_state, $queue) {
    +    '#title' => t('Show Only Published Node in Autocomplete'),
    

    Incorrect capitalization

  4. +++ b/nodequeue.install
    @@ -441,3 +441,16 @@ function nodequeue_update_7203() {
    + * @todo Inserting a 'publish_only' field.
    

    Add description.

  5. +++ b/nodequeue.install
    @@ -441,3 +441,16 @@ function nodequeue_update_7203() {
    +	  );
    

    Incorrect indentation and whitespace.

  6. +++ b/nodequeue.install
    @@ -441,3 +441,16 @@ function nodequeue_update_7203() {
    +        'description' => '',
    +        'type' => 'int',
    +        'size' => 'tiny',
    +        'default' => 0,
    +	  );
    

    Incorrect indentation and whitespace.

visabhishek’s picture

Status: Needs review » Needs work

The last submitted patch, 9: show_only_published-2327159-9.patch, failed testing.

The last submitted patch, 9: show_only_published-2327159-9.patch, failed testing.

The last submitted patch, 9: show_only_published-2327159-9.patch, failed testing.

The last submitted patch, 9: show_only_published-2327159-9.patch, failed testing.

Bohus Ulrych’s picture

Hi, thank you for great work.
I know that this ticket is about the autocomplete but I think that it would be really nice to consider also the node status on the list of nodes for selected subqueue, not only for the autocomplete.
Let's imagine that I have published node, which I put to the queue, but later I unpublish this node. It will be still visible in in queue list.
What do you think?
Thanks

fizk’s picture

@Bohus That's an interesting feature request. It seems there could be a great many reasons to limit certain nodes from joining a queue.

Maybe a generalized filtering system would help. For example, filtering by a view - i.e. you create a view that accepts a node as an argument, and either displays the node ID if the node should be included in the nodequeue, or doesn't display the node id, thus, indicating the node should not be inserted into the nodequeue.

Either way, we should discuss that feature request in a new issue. If you can create a new issue and paste the link here, that would be great!

Edit: See #2787237: Restrict nodes by Views

Status: Needs review » Needs work

The last submitted patch, 15: show_only_published-2327159-15.patch, failed testing.

The last submitted patch, 15: show_only_published-2327159-15.patch, failed testing.

The last submitted patch, 15: show_only_published-2327159-15.patch, failed testing.

fizk’s picture

Fix automated tests.

fizk’s picture

@visabhishek Thanks for your work. Can you add some automated tests and then I can commit!

fizk’s picture

Status: Needs review » Needs work
Bohus Ulrych’s picture

Hello @fizk, patch #19 it seems to be working well.
Thank you!

dmkelner’s picture

Is this patch being committed? Very useful.

Vj’s picture

Why "publish only" for autocomplete only ? If we need to add this functionality then it should be for all source from where we can add nodes to nodequeue, otherwise it will be confusing how unpublished node listed into nodequeue which is marked as "publish only".

I have created a small patch using above comments/patches.

Please review and share your thoughts.