ApacheSolr 7.x has CTools exportables support now. That's great, but it doesn't work yet :) Exportables which live in code are not picked up, so any custom search pages for instances are not found, thus leading to a page not found.

This patch makes the search pages work again. But probably other tables/exportables will need to converted as well. This code is not ready at all to commit yet, one important part is that the UI also needs to take care of the 'disabled' property that CTools puts on objects.

Putting this major since either you go all the way or you roll this stuff back.

CommentFileSizeAuthor
#1 1386750-1.patch4.89 KBswentel

Comments

swentel’s picture

StatusFileSize
new4.89 KB

Here's the patch.

nick_vh’s picture

nick_vh’s picture

Status: Needs review » Needs work
+++ b/apachesolr_search.moduleundefined
@@ -411,13 +406,17 @@ function apachesolr_search_block_save($delta = '', $edit = array()) {
-  return $search_pages;
+function apachesolr_search_load_all_search_pages($page_id = NULL) {

Ctool is not a required component so we need to check if the module is available.

+++ b/apachesolr_search.moduleundefined
@@ -411,13 +406,17 @@ function apachesolr_search_block_save($delta = '', $edit = array()) {
+function apachesolr_search_load_all_search_pages($page_id = NULL) {
+  ctools_include('export');
+  $search_pages = ctools_export_crud_load_all('apachesolr_search_page');
+  return (!is_null($page_id) && isset($search_pages[$page_id])) ? $search_pages[$page_id] : $search_pages;

load_all, but still accept 1 page_id is probably confusing?

+++ b/apachesolr_search.pages.incundefined
@@ -9,7 +9,8 @@
+  ctools_include('export');

Same as before. Ctools is not required. This wil fail if ctools is not installed

swentel’s picture

Status: Needs work » Closed (duplicate)

Ok, marking dupe