• Hi Kyle,

    I’m investigating when the cookie with the favorites is expiring. I’m using your plugin on ‘cookies’ mode only and would like to retain the favorites settings indefinitely or until the user actively clears its own cookies.

    In the code I find some references to time()+3600, but that seems very short to me for a favorite system.

    I did some further digging but couldn’t completely comprehend the ‘syncing’ of the favorites => is the sync mechanism in place to avoid the cookies expiring prematurely?

    Could you please tell me how I can adjust the cookie duration to ‘indefinitely’?

    Quick tip (found out the hard way years ago) setting a cookie only 1 hour in the future is prone to not work on clients in very different timezones. Since the client browser time is more than 1 hour in the future, it immediately invalidates the cookie (I think).
    Since our site is having customers from around the world, setting the cookie expire time to at least a day ahead may be a better approach.

    Thanks,
    Ruud

    https://www.ads-software.com/plugins/favorites/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter Ruud Laan

    (@ruudjoyo)

    Hi Kyle,
    I hope you can make some time to check this out.

    Meanwhile I’m going to do some testing on the presumption that the favorites don’t work for people in a timezone more the +1 hours difference to the server time.

    Keep you posted

    Thanks,
    Ruud

    Thread Starter Ruud Laan

    (@ruudjoyo)

    Hi Kyle,

    Please have a look at: https://github.com/kylephillips/favorites/pull/52

    By checking out your github version I found out that the WordPress SVN version uses a cookie expiration interval of only 3600 seconds, while your master branch on GitHub uses 1 year in seconds.

    The timezone stuff doesn’t matter after all: the cookie time is set in GMT and checked accordingly, so no problems there.

    Thanks,
    Ruud

    sedelstein

    (@sedelstein)

    Hello Rudd, I am having the expire time problem that you asked about and was hoping that you see this and you might give me some advice. The author does not seem to be supporting this plugin anymore which is frustrating because after a lot of searching I found it and it does just what I’m looking for. Do you mind telling me–

    1. As a non-programer is there a way that I can fix the expiration time problem? Ideally, I would want there to be no expiration time.

    2. If the plugin is not support any longer would it be unadvisable to us it even if the expiration problem can be fixed?

    3. Do you know of a plugin that offers comparable functionality that is supported? I’ve looked and can’t find anything.

    Thanks for your input on this.

    Thread Starter Ruud Laan

    (@ruudjoyo)

    Hi Sedelstein,

    I can provide you with some answers on your questions:

    1) The plugin developer merged my code enhancements into his plugin (‘master’) version. So you now can install this plugin (download here: https://github.com/kylephillips/favorites/archive/master.zip) and tweak the expiration time to your liking, with a filter (see: https://pippinsplugins.com/a-quick-introduction-to-using-filters/).
    This also means you can make it very, very long as to be ‘non-expiring’ in real life ??

    2) Any plugin is a potential risk, especialle if not being maintained. How much of a risk depends on your situation. However at the moment no security issues are known for this plugin, see: https://wpvulndb.com/plugins?get=F
    I can also advice you to get on the wpvulndb mailinglist to keep receiving up-to-date plugin security notifications and then keep a look-out on this plugin. Once a security problem is found, disable the plugin, and wait to see if the developer is making a fix (or not).
    If no security bugs show up, things are most likely all good (or at least not known by a lot of people)

    3) I’m currently not aware of any other plugins with the same functionality. But with 40.000 plugins out there, there must be ??

    Thanks,
    Ruud

    sedelstein

    (@sedelstein)

    Rudd, thanks for your reply. I’ll look into the filters but after reading the link you provided I fear that creating one will be above my skill level.

    I’m trying to contact the developer to see what he has in mind. In case he reads this I’d like him to encourage him and let him know that this plugin has great potential including enhancements that I think would justify spending $ on a pro version.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Cookie expire time only set 1 hour in the future?’ is closed to new replies.