They show up but the only thing you can do with them is queue/dequeue, That's quite confusing and useless.

The local list should probably only include entity types/bundles that have the required field.

Comments

miro_dietiker’s picture

Component: Code » ShareBoard

This filter was once present. If it's no more, it needs to be readded ASAP.

I'm even thinking about considering this a major usability issue.

corvus_ch’s picture

Assigned: Unassigned » corvus_ch
Priority: Normal » Major
Status: Active » Needs review
StatusFileSize
new2.56 KB

The filter was already present but got lost in the templete features. Here it is again.

corvus_ch’s picture

This will be actually pretty save to commit for it only affects the template ans explicitly needs to be copied to the productive copy of the features.

miro_dietiker’s picture

Issue tags: +Needs tests

This seems fine. However, test coverage missing and as it seems, important.

corvus_ch’s picture

Writing test is currently a big issue as described in #1958562: Add ctools access plugin to suggestions tab to enable ShareBoard testing. I suggest we get this patch in and provide the tests after we have found solution for the testing.

corvus_ch’s picture

Status: Needs review » Postponed
corvus_ch’s picture

Status: Postponed » Needs work

Back to work.

corvus_ch’s picture

Title: Chapters listed in local list on Shareboard when they don't have a sharedcontent field » Add test for Chapters listed in local list on Shareboard when they don't have a sharedcontent field

Committed what was present so far. Tests will follow.

corvus_ch’s picture

Status: Needs work » Needs review

The views query plugin did not work for both search_api_solr and search_api_db. I replaced the query plugin with a calculated attribute which then can be index with search api.

As of the notices thrown in flag_get_content_flags() see #1351124: Notice: Undefined index: in flag_get_entity_flags() / flag_get_content_flags().

corvus_ch’s picture

StatusFileSize
new20.3 KB

Sorry missed the patch somehow.

corvus_ch’s picture

Status: Needs review » Needs work

The last submitted patch, sharedcontent-1941798-9.patch, failed testing.

corvus_ch’s picture

Status: Needs work » Needs review
StatusFileSize
new20.36 KB

It probably would help to have all dependencies.

Added search_api_db as test dependency.

Status: Needs review » Needs work

The last submitted patch, sharedcontent-1941798-13.patch, failed testing.

corvus_ch’s picture

Status: Needs work » Needs review
StatusFileSize
new20.41 KB

Defined dependency to get test ignored until we have updated dependencies.

berdir’s picture

Status: Needs review » Needs work

Nice cleanup.

+++ b/sharedcontent.moduleundefined
@@ -1669,3 +1669,27 @@ function sharedcontent_flag($op, $flag, $content_id, $account, $fcid) {
+ * Get is linkable.

"Returns TRUE if the index is linkable"?

+++ b/sharedcontent.moduleundefined
@@ -1669,3 +1669,27 @@ function sharedcontent_flag($op, $flag, $content_id, $account, $fcid) {
+ * Callback for the calculated is_linkable attribute of sharedcontent_index.

attribute => property

+++ b/sharedcontent.moduleundefined
@@ -1669,3 +1669,27 @@ function sharedcontent_flag($op, $flag, $content_id, $account, $fcid) {
+ * @param $index
+ *  The sharedcontent_index record to calculate the is linkable attribute.
+ * @return bool
+ *   TRUE if the referenced entity can link Shared Content, FALSE otherwise.

empty line between @param and @return.

+++ b/sharedcontent_ui/sharedcontent_ui.testundefined
@@ -0,0 +1,146 @@
+    module_load_include('inc', 'search_api', 'search_api.admin');
+    $form_state = array();
+    $form_state['values']['name'] = $form_state['values']['machine_name'] = 'db';
+    $form_state['values']['class'] = 'search_api_db_service';
+    $form_state['values']['options'] = array('form' => array('min_chars' => 1));
+    drupal_form_submit('search_api_admin_add_server', $form_state);

Seems like directly creating the entity would be easier?

  $form_state['server']  = $server = entity_create('search_api_server', $values);
  $server->configurationFormSubmit($form['options']['form'], $options, $form_state);
  $server->save();
+++ b/sharedcontent_ui/sharedcontent_ui.testundefined
@@ -0,0 +1,146 @@
+    // And one content type is linkable.
+    module_load_include('inc', 'sharedcontent_client', 'includes/sharedcontent_client.admin');
+    $form_state = array();
+    $form_state['linkables']['node']['bundles'][$type_a->type] = $type_a->type;
+    $form_state['values']['node']['bundles'][$type_a->type] = $type_a->type;
+    drupal_form_submit('sharedcontent_client_configure_linkables', $form_state);

pattern-apply-machine! :)

sharedcontent_client_attach_shared_content_field($field_name, $entity_type, $bundle);?

+++ b/sharedcontent_ui/sharedcontent_ui.testundefined
@@ -0,0 +1,146 @@
+    // And five non kinkabke content.

kinkabke? Is that something to eat?

corvus_ch’s picture

Status: Needs work » Needs review
StatusFileSize
new4.03 KB
new21.4 KB

Definitive pattern apply machine ;)

berdir’s picture

Issue tags: -Needs tests
+++ b/sharedcontent_client/sharedcontent_client.drush.incundefined
@@ -85,17 +85,16 @@ function sharedcontent_client_drush_command() {
-  if ($errors = form_get_errors()) {
-    drush_set_error('ERROR', implode(' | ', $errors));

I guess this one here is the reason using the form api makes sense. This allows you to e.g. prevent an attempt to create two servers with the same name.

corvus_ch’s picture

Status: Needs review » Fixed

Committed & pushed without the change in the drush callback.

Status: Fixed » Closed (fixed)

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