January 14, 2013
at 14:20 /
#5244
I noticed there is a problem when user tries to edit a lot conditions for an resource. Problem persists both on Chrome and Firefox browser.
When you start creating more than 4 or 5 conditions of the same type and afterwards try to edit their values, a bug occurs. System starts to duplicate records, or deletes previous records. When such a behavior occurs the only solution is to quit this page and come back to it later.
Example:
[stay] 30 If guest stays 30 days or more the price changes by -30 %
[stay] 18 If guest stays 18 days or more the price changes by -25 %
[stay] 12 If guest stays 12 days or more the price changes by -22 %
[stay] 6 If guest stays 6 days or more the price changes by -15 %
At a given point of adding and editing these values the bug occurs.
January 14, 2013
at 17:23 /
#5245
Can you give me admin access to check it out?
January 15, 2013
at 10:29 /
#5254
Hello there,
I’ve sent you the credentials for our demo site via the contact form in Contact. There I posted the link to this discussion as well as the exact link, username and pass for our demo.
Thank you in advance.
Looking forward to hearing from you.
Best Regards,
Svetoslav
January 24, 2013
at 18:12 /
#5418
+1 for this bug.
I can’t even find a pattern to when the bug occurs. I have [stay] filters for 2, 3, 4, 5, 6, 7 nights and when I edit any of them sometimes it works, sometimes it creates a duplicate.
On deletion sometimes it works, sometimes it deletes another.
On addition, sometimes it adds correctly, other times it will overwrite another (or add itself and delete another)
Any progress/report on this?
January 25, 2013
at 12:38 /
#5429
An update:
When I have 6 ‘stay’ filters added – 7 nights, 6 nights, 5 nights etc. it seems to always be the first filter that encounters the issue – that with the id of 0. I have added a dummy time filter (in the past) which now appears first in the filter list and therefore takes the ID of 0 and the other stay filters now appear to edit etc. without issue.
This is a bit of a fudge work around and would appreciate if there’s anything that can be done.
Thanks in advance.
January 25, 2013
at 13:58 /
#5432
I’ll check it when I’m back home next week.
January 25, 2013
at 18:50 /
#5450
think i’ve fixed/found the cause. There is a line of code to check if the ‘price_filter_edit’ POST variable is set.
if(isset($_POST['price_filter_edit']) && !empty($_POST['price_filter_edit']) && isset($filters[$_POST['price_filter_edit']])){
PHP empty() treats 0 and “0” as being empty, so the block concerned with unsetting the filter with an ID of 0 will not be executed.
I changed the statement to:
if(isset($_POST['price_filter_edit']) && isset($filters[$_POST['price_filter_edit']])){
and all seems to be well.
January 25, 2013
at 19:40 /
#5451
Thank you for sharing it. I think this is the first time a bug got fixed by a user before I could find it.
The problem with not deleting will come from it, but what’s with the overwrite you’ve also talked about?
Do you think it also came from that?
Regards