Events Made Easy Forums Bug fixed or feature request implemented Date disappears when editing event

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #42072
    Anonymous
    Inactive

    Hi!

    I have a rather urgent problem with your event manager. Everything works fine when I add a new event. However, when I edit an existing event, the start and end date fields are empty.

    When I check the fields with Firebug, I can see that they in fact have the correct date filled in.

    [input type="text" value="2010-09-30" name="event_date" id="date-to-submit"]

    However, I suspect the jQuery Datepicker doesn’t recognize this date format (2010-09-30) and creates its own fields. You’re probably using the default mm/dd/yy date format.

    Is there a way to fix this? Can I correct my PHP settings somehow? I.e. with setlocale?

    Thanks!

    #44662
    Franky
    Keymaster

    – what version of the plugin are you using?

    – if you suspect jquery, I’d suggest to try a different browser. Which browser are you using?

    – you can also always try the trunk (dev) version : http://downloads.wordpress.org/plugin/events-manager-extended.zip

    – or give me some access to your backend, to see if I can reproduce the problem

    Also: disable all other plugins and see what happens then. If it works ok: reactivate one by one until you find the problem plugin.

    #44663
    Anonymous
    Inactive

    Hi!

    thanks for the answer.

    – Version: 3.1.1 / trunk / dev, I searched your Forums and figured I should try the dev version first. I installed it and tested it right before posting here

    – Same thing happens with Firefox 3 (latest), Safari 5 (latest) as well as IE 7 and 8.

    – It’s definitely NOT a javascript error. All scripts work fine. My guess is that your database select returns the date in a format that isn’t compatible with the jquery date picker. As I said, if I turn off JS or check with firebug, the date is in the format dd-mm-yyyy.

    – Same thing happens with all plugins deactivated. I don’t use that many anyway.

    When I add an event, everything is fine. The datepicker works. When I then edit that same event, I can see the date as dd-mm-yyyy, i.e. 20-12-2010 and then it gets overwritten/removed by the jQuery datepicker. Since the datepicker produces yy/mm/dd dates, I suspect the database is returning the date in a wrong format or the localisation autodetect doesn’t work.

    Please note that the website is US english although it’s hosted on a webserver in Austria with German locales. This would probably be the cause of the problem.

    If you need access to the backend, let me know.

    Here is a phpinfo page for you: http://dev.partnerexcellence.com/info.php

    Best,

    Alex

    #44664
    Franky
    Keymaster

    I’m guessing a localization issue. The jquery date picker in fact hides the real input field and shows a localised field with the data. This would indeed mean that the date picker has issues, but if it works for new events …

    I’ll try this here as well, but backend access would be nice, even if just to see it happen …

    #44665
    Franky
    Keymaster

    Btw, this seems weird in your phpinfo output:

    Default timezone System/Localtime

    ==> this is not a real timezone, and this might be throwing the datepicker off course.

    Edit: since you have php 5, you should have the function date_default_timezone_set(), and this function is being called from within wordpress wp-settings.php, so that should be ok..

    #44666
    Anonymous
    Inactive

    Oh no you got that wrong. It works for new events because the date fields are both empty. Then you pick a date with the datepicker and everything is fine.

    My guess is that the datepicker has issues when converting the (probably incorrectly) stored dates BACK into its own format.

    Could you check with your own local version what happens when you edit an event? And that the event date is indeed in the yyyy-mm-dd format?

    [input type="text" value="<strong>2010-09-15</strong>" name="event_date" id="date-to-submit"]

    As for backend access, where can I reach you via Email?

    Thanks!

    #44667
    Franky
    Keymaster

    This is what I have when editing an event:

    <input id="localised-date" type="text" name="localised_event_date" value="09/09/2010" style="display: none;" readonly />
    <input id="date-to-submit" type="text" name="event_date" value="2010-09-09" style="background: #FCFFAA" />
    <input id="localised-end-date" type="text" name="localised_event_end_date" value="09/09/2010" style="display: none;" readonly />
    <input id="end-date-to-submit" type="text" name="event_end_date" value="2010-09-09" style="background: #FCFFAA" />

    No problem at all … probably in your case the localised_event_date is empty?

    Can you check the WPLANG parameter you are using in wp-settings.php? Only these are supported (the first 2 letters of WPLANG):

    events-manager.php:$localised_date_formats = array(

    “am” => “dd.mm.yy”,”ar” => “dd/mm/yy”, “bg” => “dd.mm.yy”, “ca” => “mm/dd/yy”, “cs” => “dd.mm.yy”, “da” => “dd-mm-yy”, “de” =>”dd.mm.yy”, “es” => “dd/mm/yy”, “en” => “mm/dd/yy”, “fi” => “dd.mm.yy”, “fr” => “dd/mm/yy”, “he” => “dd/mm/yy”, “hu” => “yy-mm-dd”, “hy” => “dd.mm.yy”, “id” => “dd/mm/yy”, “is” => “dd/mm/yy”, “it” => “dd/mm/yy”, “ja” => “yy/mm/dd”, “ko” => “yy-mm-dd”, “lt” => “yy-mm-dd”, “lv” => “dd-mm-yy”, “nl” => “dd.mm.yy”, “no” => “yy-mm-dd”, “pl” => “yy-mm-dd”, “pt” => “dd/mm/yy”, “ro” => “mm/dd/yy”, “ru” => “dd.mm.yy”, “sk” => “dd.mm.yy”, “sv” => “yy-mm-dd”, “th” => “dd/mm/yy”, “tr” => “dd.mm.yy”, “ua” => “dd.mm.yy”, “uk” => “dd.mm.yy”, “us” => “mm/dd/yy”, “CN” => “yy-mm-dd”, “TW” => “yy/mm/dd”);

    If you have another basic locale, the localised start/end dates will be empty as events manager looks in this array for conversion.

    For backend access: liedekef [at] telenet.be (but probably not very usefull …)

    #44668
    Anonymous
    Inactive

    Hey,

    exactly, those localised fields are empty for me.

    And here’s the culprit 🙂

    define ('WPLANG', 'custom-en');

    I have to use a custom english language file to replace two words in the backend… I changed it to en-custom which is better anyway and everything is fine.

    Thanks for the help! I really appreciate it 🙂


    SOLVED


    #44669
    Franky
    Keymaster

    tssss … bad boy, creating your own English 🙂

    Anyway, glad to see it solved!

Viewing 9 posts - 1 through 9 (of 9 total)
  • The forum ‘Bug fixed or feature request implemented’ is closed to new topics and replies.
Scroll to Top