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: Structure - Hide from Nav not working

Status Resolved
Add-on / Version Publisher Lite 1.2.2
Severity Critical
EE Version 1.6.1

Sam Lomax

Apr 03, 2014

Hi Brian,

Before I start, I’ll just confirm for you that I’ve seen ticket #809 which is on this same topic but as it relates to Publisher (not Publisher Lite) I thought it warranted a new ticket.

In #809 you mentioned here that “this setting does not work for different languages”, but it appears that Publisher Lite also has this same problem - which obviously isn’t multilingual. Given this, I thought it could be worth revisiting the issue as this was working prior to us upgrading to 1.2.2 (and Structure 3.3.14).

Thanks for your help.

Kind regards,

Sam Lomax
Blis Web Agency

#1

BoldMinded (Brian)

It doesn’t matter if its Publisher Lite. Its the same code trying to do the same thing, which the Structure hook isn’t allowing.

#2

Sam Lomax

Ok, I’m coming into this blind and appreciate you’ve spent a fair bit of time on this one but I’m hoping you’ll entertain my poking around just in case it’s led to a potential solution.

My problem is, I don’t understand why in publisher_site_pages.php you need this:

ee()->db->where('entry_id', ee()->input->post('entry_id'))
    ->update('structure', array(
    'hidden' => 'n'
));

Your comment above says:

// Always set the visibility to no, we handle that in our own hook // and via the hide_in_nav column in publisher_titles

If I comment out / remove the code above, it restores the ability to use Structure’s “Hide From Nav” as per normal. I tested this pretty well and it doesn’t seem to have affected anything for me; Publisher (Lite) seems to still be working as it should be.

Now from here I may have travelled a little off course but I did try to continue poking around to find out what negative affect this may have actually had on things and I did find that in Publisher_Entry.php the Save function is looking for post data which contains a value for “structure__hidden” but for me, this function actually has no affect as it only fires if the hook “publisher_entry_save_end” is active in the exp_extensions table… which it isn’t (for me)…. so if I’ve broken something I suspect that I’ll only see this when another extension tries to us this hook in the future.

So, I am left wondering whether it’s really necessary to override the exp_structure table values? Perhaps underneath certain conditions it is but for my setup where the “publisher_entry_save_end” hook isn’t utilised, I don’t think it is. WIth this said, I really have no idea how what you listed on the Structure support desk actually affects this problem and given this, perhaps there’s something obvious I’m just not getting: https://structure.tenderapp.com/discussions/suggestions/1104-structure_get_selective_data_results-doesnt-support-removing-nodes

However, if it’s possible that any of this can throw some light on how we can safely return to using “Hide from Nav” without affecting Publisher (Lite), then it would be worth knowing about.

Cheers,

Sam

#3

BoldMinded (Brian)

Sam, I took the information you provided and looked into this some more. While you’re debugging wasn’t entirely accurate it did cause me to look at things a little different and actually find a fix for this. I’m emailing you a new build which should resolve this 😊

#4

BoldMinded (Brian)

Marking this resolved b/c I know the new build fixes it 😊

Login to reply