By default, there is an entityqueue type for each bundle. As far as I can tell, this is convention only.
Theoretically, this should work.

Also, it suggests that maybe entityqueue_type_get_name() isn't the best named function.

Comments

tim.plunkett’s picture

StatusFileSize
new793 bytes

Er.

jody lynn’s picture

This works, and I was able to activate it by running:

drush php-eval "module_load_include('install', 'entityqueue', 'entityqueue'); _entityqueue_create_entityreference_field(_entityqueue_get_target_field_name('foo'), 'entityqueue', 'foo', t('Queue items'), 0);"

I could specify the entity/bundle to use on the field settings, but on the entityqueue config itself I could not specify a bundle (since it had no idea of the entity). It works though.

Would be great to have a UI for adding the new bundles as well.

jody lynn’s picture

Another problem related to the custom queue not knowing its entity type: when I create a views relationship to a queue the queue choices for my view's entity are not shown as options if those queues are custom bundles.

tim.plunkett’s picture

StatusFileSize
new2.4 KB

Now I'm just making stuff up. But really, it should be possible to have more than one type of node queue, so they can be given different fields. Right?

jody lynn’s picture

Agree completely. Since the queues are fieldable, the need for additional arbitrary bundles is clear. Will test.

tim.plunkett’s picture

To use that last patch, I had a custom module called zed.module:

/**
 * Implements hook_entityqueue_types().
 */
function zed_entityqueue_types() {
  $types = array();
  $types['zed'] = array(
    'label' => t('Zed'),
    'base type' => 'node',
  );
  return $types;
}

I then allowed me to select node content types as target types on the creation page, and Views integration worked.

jody lynn’s picture

Status: Needs review » Needs work

This is an improvement- now the entityqueue UI works right when adding a new queue (lets me pick from the base type's bundles)

However, entityqueue_handler_relationship_entityqueue.inc (options_form) still needs work. It needs to let you choose available queues based on base type not 'type'. Perhaps we need to add a new column for base_type to {entityqueue}.

amateescu’s picture

Status: Needs work » Fixed

The module has been pretty much rewritten in the 7.x-1.x-ctools branch. The unified queues+subqueues as a single entity type reached it's limits because of limitations from Entity reference.

Things have been split to the familiar structure from Nodequeue, with queues being entity bundles and subqueues being entities with a entity reference field provided by default.

The only thing left to do in the 7.x-1.x-ctools branch in order to bring back the current functionality is to implement the auto-creation of subqueues for the simple queue handler.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

jody lynn’s picture

StatusFileSize
new2.5 KB

We're on the old branch still, using the patch in #4. This additional patch addresses the problem in #7 in terms of expanding this approach for views support.

jody lynn’s picture

StatusFileSize
new2.38 KB

Fixing typo in last patch

tim.plunkett’s picture

StatusFileSize
new1.93 KB

editing patches by hand never works.

jody lynn’s picture

StatusFileSize
new4.4 KB

Full current patch off 7.x-1.x