Archived Support Site

This support site is archived. You can view the old support discussions but you cannot post new discussions.

Redirect on Save and close / Discard draft setting not working

David Hyland's Avatar

David Hyland

30 Dec, 2014 04:05 PM

EE 2.8.1
BWF 1.6.4.2

Greetings, I have a curious problem in that I can't get the "Redirect on Save and close / Discard draft" setting to work. I have it set to "EE Edit List". I also have Structure (v3.3.14.5) installed and its "Redirect to Structure on entry publish/save" setting is set to "Structure managed entries only". On clicking Save & Close I'm redirected to the Structure listing.

What's curious is that on my local install of the same site, with the same versions and settings, I'm correctly redirected to the EE list and I can't see any other differences.

So is the Structure redirect extension taking priority over your one? Any ideas on what I can do to correct this?

Thanks!

  1. Support Staff 1 Posted by Malcolm Elswort... on 02 Jan, 2015 03:40 PM

    Malcolm Elsworth's Avatar

    Hi David,

    The BWF redirect setting will only take effect when you are working with a BWF Draft (e.g. an entry which is already published). If you are working on an entry which isn't yet published the standard EE re-direction will take effect and if Structure is enabled this will over-ride this.

    Can you check to see if your local set up behaves correctly when you are working with a BWF Draft? When you Save and Close or Discard a Draft the BWF setting should always take priority.

    Thanks,
    Malcolm

  2. 2 Posted by David Hyland on 06 Jan, 2015 12:55 AM

    David Hyland's Avatar

    Hi Malcolm

    Yes indeed you are correct, I hadn't noticed that difference before.
    Thank you.

    My client however has now asked me to investigate whether I can override
    the Structure redirect for all BWF submissions. Given how intrinsic your
    code is to the inner workings of EE I'm not sure whether a custom
    extension would serve best for this or to hack your code and place the
    override there or whether it's best to leave that one well alone. Any
    thoughts or recommendations on this?

    Cheers

    David

  3. Support Staff 3 Posted by Malcolm Elswort... on 06 Jan, 2015 10:41 AM

    Malcolm Elsworth's Avatar

    Hi David,

    To override the Structure redirect behavior will require hacking Structure, not BWF.

    One option would be to add a test for 'is_BWF_managed' in the Structure code where the redirection decision is made. This will pass the current channel ID to a method which queries the exp_ep_settings table.

    The data in this is a serialised array so you will need to gran the whole thing, unserialise it and loop through looking for your channel.

    I hope this is useful.

    Best wishes,
    Malcolm

  4. 4 Posted by David Hyland on 06 Jan, 2015 02:07 PM

    David Hyland's Avatar

    Cool that makes sense, many thanks as always Malcolm!

  5. Malcolm Elsworth closed this discussion on 08 May, 2015 09:30 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac