Publisher does not support the Fluid field type. Please do not contact asking when support will be available.

If you purchased an add-on from expressionengine.com, be sure to visit boldminded.com/claim to add the license to your account here on boldminded.com.

Ticket: Low Search not indexing Wygwam field in Bloqs block when using Publisher Lite

Status Resolved
Add-on / Version Publisher Low Search 3.0.0
Severity
EE Version 3.5.10

Oliver Jackson

Apr 18, 2018

We have an EE3 site that was built using Bloqs (3.0.16) and Low Search (5.0.4), to which we are now trying to add Publisher Lite (2.7.7) to provide our client with some basic workflow functionality, plus Publisher Low Search (3.0.0) for compatibility.

Unfortunately, after installing those two addons, we are seeing an issue where the content of a Wygwam (4.0.6) field within a Bloqs block is not being indexed by Low Search, so search results for that content are not available.

I can see that Bloqs has a helper method called `updateFieldData` in `/system/user/addons/bloqs/libraries/EEBlocks/Database/Adapter.php`, which updates the table `exp_channel_data` with a concatenated HTML version of the Bloqs field. I added some logging within this method and I can see it’s definitely getting called when I save an entry, and that the correct content is definitely being passed as an argument. However when I check `exp_channel_data` in the database after saving an entry this content isn’t present, and so Low Search can’t index it. It’s also not showing up in the `exp_publisher_data` table.

The `updateFieldData` method is a pretty straightforward database query, so I’m guessing that there might be some other hook (presumably in Publisher or Publisher Low Search?) that is also updating these tables as part of the save process.

I’d be grateful for any suggestions you might have as to why we’re seeing this behaviour, and what we might be able to do to get everything working together.

#1

BoldMinded (Brian)

This is a known bug. I’ll post links to new builds in the next comment. Generally though before posting a ticket you should update all versions of the add-ons to the latest… looks like you’re a few versions behind.

#2

BoldMinded (Brian)

Comment has been marked private.

#3

Oliver Jackson

Thanks for the update Brian, however I’m afraid I’m still seeing the same issue after upgrading to the newer build you kindly provided.

Is there anything else I could try?

#4

BoldMinded (Brian)

Did you re-save the entries? Just uploading the new files won’t fix it, the entries need to be re-saved so the database is updated.

#5

BoldMinded (Brian)

Also, did you update to the latest version of Bloqs too?

#6

Oliver Jackson

Yes, I re-saved the entries.

I haven’t updated to the latest version of Bloqs because I don’t think we have renewed our license for this site, so I’m not sure that we’re covered for the 4.x version of the add-on.

I have however just noticed this other ticket:

https://boldminded.com/support/ticket/1708

We are using Structure (4.1.15) on this site as well. I can confirm that there are no issues on the live instance of the site, which has Bloqs, Structure and Low Search – it only seems to be when Publisher is introduced that indexing stops working.

#7

BoldMinded (Brian)

In ext.structure.php find after_channel_entry_save(), and add the return statement:

function after_channel_entry_save() {
    return;
    // more code here
}

See if that fixes it.

#8

Oliver Jackson

Thanks for the suggestion Brian. That doesn’t seem to have made a difference, sorry.

For reference here’s the full code I now have for that method, with the return statement included:

function after_channel_entry_save($entry, $values)
{
 return;

 if (REQ == 'PAGE' || REQ == 'ACTION') return false;

 // If `submit` is set, and it is not set to edit ("Save" from the Channel Entry instead of "Save and Close"),
 // set a custom flashdata flag we check in `sessions_end` to do the redirect on the next page. We have to do
 // this because of EE firing this hook BEFORE `after_channel_entry_update` which causes issues with other add-ons.
 // Confirmed with Kevin Cupp that they will not be changing the hook order for v4 at least.
 if(isset($values['submit']) && $values['submit'] !== "edit")
 {
  ee()->session->set_flashdata('structure_redirect', '1');
  ee()->session->set_flashdata('structure_channel_id', $entry->channel_id);
 }
}
#9

BoldMinded (Brian)

Comment has been marked private.

#10

BoldMinded (Brian)

Also, if you haven’t already, make sure your Bloqs fields, and each atom in the block is set to Searchable. If that was overlooked, then this will never work.

#11

BoldMinded (Brian)

Just checking in to make sure that build I sent fixes the issue?

#12

BoldMinded (Brian)

Closing this ticket b/c the 2.7.10 build fixes it.

#13

BoldMinded (Brian)

Oliver, are you re-opening this ticket? This is the second time today I’ve seen it resurrected but no additional information provided.

Login to reply