• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

[SOLVED] Firefox & IE issues : date field (popup calendar) and calc fields don't work

marcq

Member
Hi,

In one of my forms I've got a date field (datepicker) and 3 calc fields. Work well with Chrome, but not with Firefox(last version) and IE8.

In Firefox and IE8 + IE11 I'm unable to popup calendar (datepicker) and calc fields are not calculated +
I have got stakeoverflow error in IE8 + IE11. So the form can't be filled in...

Did someone experience this ? Is there a way to solve this ?

Thanks in advance for you reply.

Marc
 
Template Protostar
Fabrik last version : calc and date plugin updated
Joomla 3
Firefox 35.0.1
Form plugins running on that form : Email, Comment, Autofill and PHP
 
Hi there,
Since I'm a newbie and I have less time to solve this issue, I'm ready to pay in order to solve this as soon as possible.
 
I'm confused, because the only form I see with those plugins on it ('demandes de conseil') doesn't have the calc elements on it.

Also, if I try and load the front end of your site in Chrome, I get "this web page has a redirect loop".

And if I try and view the list I think is the one with the calc elements on the backend, I get "you are not authorized to view this resource" (presumably because the user you gave us in your My Sites isn't in the group which has access to it).

If you can give me some clear instructions on which form I need to look at, and make sure the user I have has access, and that there are no redirect loops, etc ... I'll see what I can do.

-- hugh
 
I'm confused, because the only form I see with those plugins on it ('demandes de conseil') doesn't have the calc elements on it.

Also, if I try and load the front end of your site in Chrome, I get "this web page has a redirect loop".

And if I try and view the list I think is the one with the calc elements on the backend, I get "you are not authorized to view this resource" (presumably because the user you gave us in your My Sites isn't in the group which has access to it).

If you can give me some clear instructions on which form I need to look at, and make sure the user I have has access, and that there are no redirect loops, etc ... I'll see what I can do.

-- hugh


Hi Hugh,
'
Thanks a lot for your reply. The problem doesn't concern the "Demande de conseils" Form but the "G?rer le profil des clients" Form which Elements are in 'G?rer le profil des clients": date field : date_naissance. Calc fields : "imc" and "evaluation".

http://www.pharmacie-bdf.ch/espaceclients/index.php?option=com_fabrik&view=form&formid=12&Itemid=153

If you login as Client 1 (please see details in my Profil Site notes to get the password)
http://www.pharmacie-bdf.ch/espaceclients/ and click to "G?rer mon profil" in the right menu you will see the "Date de naissance" field which works (you can pick a date) in Chrome but not in Firefox and IE. And you will see the two fields "IMC" and "Evaluation" are recalculated with Chrome, but not with Firefox and IE.

In the meantime (yesterday) I have hired someone (freelancer.com) in order to solve this issue without changing anything on the Fabrik core files. He will get back to me with a solution. If he has not solution without needing to make changes on the core files I'll will get back to you, because I'm not a professional and I canno't assess if it could be the right solution.

Cheers,

Marc
 
Hi Hugh,

The freelance I hired was unable to solve this issue. I would appreciate, if you could have a look because I'm truly stuck.

The form and elements to look at are :

Back-end
"G?rer le profil des clients"
http://www.pharmacie-bdf.ch/espacec...option=com_fabrik&view=form&layout=edit&id=12

Elements
?G?rer le profil des clients?
Fields
Age (calculated on basis of value of ? date de naissance ? field :

Calculation :
$thendate = strtotime("{pbdf_fabrik_user_clients___date_naissance}");
$nowdate = strtotime("today");
$datediff = ($nowdate - $thendate);
$age = round($datediff / 31556926);
return $age;
Ajax field :
{pbdf_fabrik_user_clients___date_naissance};


IMC (calculated on basis of values in fields ? Taille ? and ? Poids ?)

Calculation :
$imc = '{pbdf_fabrik_user_clients___poids_raw}' / ('{pbdf_fabrik_user_clients___taille_raw}' * '{pbdf_fabrik_user_clients___taille_raw}');

$imc = number_format($imc, 2, '.', '');

if ($imc<=0.00) {
return "";
}
else if ($imc<16.5) {
return "$imc";
}
else if ($imc<18.5) {
return "$imc";
}
else if ($imc<25) {
return "$imc";
}
else if ($imc<30) {
return "$imc";
}
else if ($imc<35) {
return "$imc";
}
else if ($imc<40) {
return "$imc";
}
else {
return "$imc";
}
Ajax field :
{pbdf_fabrik_user_clients___taille},
{pbdf_fabrik_user_clients___poids};

Evaluation (calculated on basis of values in fields ? Taille ? and ? Poids ?)

Calculation :
$imc = '{pbdf_fabrik_user_clients___imc_raw}';

if ($imc<=0.00) {
return "";
}
else if ($imc<16.5) {
return "Etat de d?nutrition";

}
else if ($imc<18.5) {
return "Etat de maigreur";
}
else if ($imc<25) {
return "Corpulence normale";
}
else if ($imc<30) {
return "Surpoids";
}
else if ($imc<35) {
return "Ob?sit? mod?r?e";
}
else if ($imc<40) {
return "Ob?sit? s?v?re";
}
else {
return "Ob?sit? morbide, consulter un m?decin";
}
Ajax field :
{pbdf_fabrik_user_clients___imc};






Front-end
http://www.pharmacie-bdf.ch/espaceclients/

Login as "Client 1" (please see details in my Profil Site notes to get the password) and click on "G?rer mon profil" in the right menu

First issue :

With Chrome :

As you will see ONLOAD of the form the calculation of these fields:

Age
IMC
Evaluation

Return ?undefined? instead of returning (calculating) the correct value.

With is not the case when we are using Firefox and IE, the correct values are displayed (which are stored in the ?pbdf_fabrik_user_profils_clients?.

This fields needs to be recalculated on load because the ?Pharmacie? staff is also authorized to change the ?Date de naissance?, ?Taille? and ?Poids? values.

Second issue :

With Chrome :

When I?m ?picking up? a date, the value is not recalculated in the ?Age? field as it should be. ?Undefined? value stay.

When I?m filling the ?Taille? and ?Poids? fields, the values in the ?IMC? and ?Evaluation? fields are not recalculated, as it should be. ?Undefined? values stays.

With Firefox and IE :

I?m unable to pick up a date in the ?Date de naissance? field.

When I?m filling the ?Taille? and ?Poids? fields, the values in the ?IMC? and ?Evaluation? fields are not recalculated, as it should be.

Hugh, I hope is it clear enough. Please do not hesitate to ask me if something isn?t clear enough. I would appreciate if you could help me here, because I?m unable to solve these issues since more than a week. As I told you I?m ready to pay if needed.

Thanks in advance,


Marc
 
OK, the first problem I see in FF when I open that form is there is an infinite redirect loop happening:

http://screencast.com/t/P5kAfv9VnC

Sometimes it gets as far as running the date element's initilaization JS, but if that manages to run, it errors out with "too much recursion" - again, an indication you have a redirect loop.

And if I log in as 'fabrik' on the front end, as mentioned in my original reply, I can't even get as far as that form, FF just immediately tells me there is a "redirect loop":

http://screencast.com/t/9W9kfRpK

... which almost certainly means there is something in your .htaccess which is causing a 303 redirect back to the same URL.

Fix that, and I suspect things will start working.

Oh, and on one of your date elements you have this JS code:

Code:
$('#pbdf_fabrik_user_clients___date_naissance').on('show', function () {
    $.fn.modal.Constructor.prototype.enforceFocus = function () { };
});

... which is blowing up on page load, so I disabled it. I have no clue what that is supposed to do, except maybe capture the focus to that element on page load, but it kind of looks jQuery-ish, in which case you'd need to use jQuery(), not $().

-- hugh
 
I had a quick look via ftp, and you don't seem to be using an htaccess file in the J! site, although you do have one at the top level that does user home dir mapping. I tried disabling that, but didn't seem to haelp.

So I suspect it may have something to do with that "Redirect" extension, although i tried disabling the system plugin that oes with it, and that didn't seem to fix it either.

So I'm not sure what's doing it, but something is doing a 303 redirect back to the same page, and causing an infinite redirect loop.

-- hugh
 
Tried opening the form in Chrome, see if I could find any better clues in Chrome's debugger, but Chrome crashed after chewing up 3GB of memoery! :(

Not sure why it's working in Chrome for you, but definitely isn't for me!

-- hugh
 
OK, the first problem I see in FF when I open that form is there is an infinite redirect loop happening:

http://screencast.com/t/P5kAfv9VnC

Sometimes it gets as far as running the date element's initilaization JS, but if that manages to run, it errors out with "too much recursion" - again, an indication you have a redirect loop.

And if I log in as 'fabrik' on the front end, as mentioned in my original reply, I can't even get as far as that form, FF just immediately tells me there is a "redirect loop":

http://screencast.com/t/9W9kfRpK

... which almost certainly means there is something in your .htaccess which is causing a 303 redirect back to the same URL.

Fix that, and I suspect things will start working.

Oh, and on one of your date elements you have this JS code:

Code:
$('#pbdf_fabrik_user_clients___date_naissance').on('show', function () {
    $.fn.modal.Constructor.prototype.enforceFocus = function () { };
});

... which is blowing up on page load, so I disabled it. I have no clue what that is supposed to do, except maybe capture the focus to that element on page load, but it kind of looks jQuery-ish, in which case you'd need to use jQuery(), not $().

-- hugh


Thanks a lot Hugh for your time and dedication to these issues, I appreciate. Infortunetely it doesn't seems to be an.htaccess issue. There's is nothing in the htaccess file which could lead to this kind of problem.

The Joomla files are in a sub directory of the informaniak server. To be clear :

http://www.pharmacie-bdf.ch/ -> html website installation root of the pharmacy
http://www.pharmacie-bdf.ch/espaceclients/ -> joomla installation root

htaccess file of the website is :

################################## Errors ######################################
#ErrorDocument 301 /error/301-moved_permanently.html
#ErrorDocument 302 /error/302-moved_temporarily.html
#ErrorDocument 303 /error/303-see_other.html
#ErrorDocument 400 /error/400-bad_request.html
ErrorDocument 401 /error/401-authorization_required.html
#ErrorDocument 402 /error/402-payment_required.html
ErrorDocument 403 /error/403-forbidden.html
ErrorDocument 404 /error/404-not_found.html
#ErrorDocument 405 /error/405-method_not_allowed.html
#ErrorDocument 406 /error/406-not_acceptable.html
#ErrorDocument 407 /error/407-proxy_authentication_required.html
ErrorDocument 408 /error/408-request_timed_out.html
#ErrorDocument 409 /error/409-conflicting_request.html
#ErrorDocument 410 /error/410-gone.html
#ErrorDocument 411 /error/411-content_length_required.html
#ErrorDocument 412 /error/412-precondition_failed.html
#ErrorDocument 413 /error/413-request_entity_too_long.html
#ErrorDocument 414 /error/414-request_uri_too_long.html
#ErrorDocument 415 /error/415-unsupported_media_type.html
ErrorDocument 500 /error/500-internal_server_error.html
#ErrorDocument 501 /error/501-not_implemented.html
#ErrorDocument 502 /error/502-bad_gateway.html
ErrorDocument 503 /error/503-service_unavailable.html
#ErrorDocument 504 /error/504-gateway_timeout.html
#ErrorDocument 505 /error/505-http_version_not_supported.html
################################################################################

######################### Howto map /~user to /user ############################
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/([^/]+)$
RewriteCond %{DOCUMENT_ROOT}/%1 !-d
RewriteCond /home/sites/%{SERVER_NAME}/users/%1 -d
RewriteRule ^([^/]+)$ http://%{HTTP_HOST}/$1/ [R,L]
RewriteCond %{REQUEST_URI} ^/([^/]+)/
RewriteCond %{DOCUMENT_ROOT}/%1 !-d
RewriteCond /home/sites/%{SERVER_NAME}/users/%1 -d
RewriteRule ^([^/]+)(.+)$ /~$1/$2
################################################################################

###################### Howto map /users/user to /users/user ####################
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/users/([^/]+)$
RewriteCond %{DOCUMENT_ROOT}/%1 !-d
RewriteCond /home/sites/%{SERVER_NAME}/users/%1 -d
RewriteRule ^users/([^/]+)$ http://%{HTTP_HOST}/users/$1/ [R,L]
RewriteCond %{REQUEST_URI} ^/users/([^/]+)/
RewriteCond %{DOCUMENT_ROOT}/%1 !-d
RewriteCond /home/sites/%{SERVER_NAME}/users/%1 -d
RewriteRule ^users/([^/]+)(.+)$ /~$1/$2
################################################################################

htaccess file of the joomla installation :

php_flag display_errors off

Concerning the "G?rer mon profil" form the problem remains... Even after deleting the content of the two htaccess files.

I've got the same redirection loop problem with two other forms (in Chrome, FF and IE) :

front end (Menu Ordonnances | Transmettre une ordonnance) : http://www.pharmacie-bdf.ch/espaceclients/index.php?option=com_fabrik&view=form&formid=6&Itemid=138
front end (Menu Conseils | Transmettre une demande) : http://www.pharmacie-bdf.ch/espaceclients/index.php?option=com_fabrik&view=form&formid=5&Itemid=149

Back end "G?rer les ordonnances " : http://www.pharmacie-bdf.ch/espacec...?option=com_fabrik&view=form&layout=edit&id=6
Back end "G?rer les demandes de conseils" : http://www.pharmacie-bdf.ch/espacec...option=com_fabrik&view=form&layout=edit&id=5#

The strange thing is when I'm disabling the autofill plugin of these two forms there is not redirection problem anymore in Chrome, FF and IE.. The name, firstname and no_assure fields are just empty, which is normal ;-) Now it is still disabled so it works without errors, but if you enable again the autofill plugin in these two forms you will see that the redirection problem is generated again.

I checked the Redirect on login and Access manager Extensions which enable me to display the menus, modules according to my user-groups, but noting seems to be wrong...

I really don't know what to do now. What would you suggest ? Start all over again ?
 
OK, the first problem I see in FF when I open that form is there is an infinite redirect loop happening:

http://screencast.com/t/P5kAfv9VnC

Sometimes it gets as far as running the date element's initilaization JS, but if that manages to run, it errors out with "too much recursion" - again, an indication you have a redirect loop.

And if I log in as 'fabrik' on the front end, as mentioned in my original reply, I can't even get as far as that form, FF just immediately tells me there is a "redirect loop":

http://screencast.com/t/9W9kfRpK

... which almost certainly means there is something in your .htaccess which is causing a 303 redirect back to the same URL.

Fix that, and I suspect things will start working.

Oh, and on one of your date elements you have this JS code:

Code:
$('#pbdf_fabrik_user_clients___date_naissance').on('show', function () {
    $.fn.modal.Constructor.prototype.enforceFocus = function () { };
});

... which is blowing up on page load, so I disabled it. I have no clue what that is supposed to do, except maybe capture the focus to that element on page load, but it kind of looks jQuery-ish, in which case you'd need to use jQuery(), not $().

-- hugh

Concerning this, sorry I forgot to delete this

Code:
$('#pbdf_fabrik_user_clients___date_naissance').on('show', function () {
    $.fn.modal.Constructor.prototype.enforceFocus = function () { };
});
 
Yup, something on your server is redirecting that AJAX call for the autofill. If I run it as a 'GET' directly from a browser's address bar, it works. But run as a POST via AJAX, it's being redirected to the index page with a 303, and goes in to a redirect loop.

It's not Fabrik, of that I am 99.999% sure.

As it doesn't appear to be htaccess or J! plugin related, the only other candidate would be your web server, either in the main httpd.conf, or some kind of mod_security type deal.

Suggest you talk to your provider, see if there's anything on that web server which could potentially redirect POST calls via AJAX.

-- hugh
 
Yup, something on your server is redirecting that AJAX call for the autofill. If I run it as a 'GET' directly from a browser's address bar, it works. But run as a POST via AJAX, it's being redirected to the index page with a 303, and goes in to a redirect loop.

It's not Fabrik, of that I am 99.999% sure.

As it doesn't appear to be htaccess or J! plugin related, the only other candidate would be your web server, either in the main httpd.conf, or some kind of mod_security type deal.

Suggest you talk to your provider, see if there's anything on that web server which could potentially redirect POST calls via AJAX.

-- hugh


Hi Hugh, should be that because all works fine on localhost and I've got the same version on both sides (local and server). I will take contact with my provider and I'll get back to you as soon as possible with hopefully a good news. Thanks a lot again, Marc
 
Yup, something on your server is redirecting that AJAX call for the autofill. If I run it as a 'GET' directly from a browser's address bar, it works. But run as a POST via AJAX, it's being redirected to the index page with a 303, and goes in to a redirect loop.

It's not Fabrik, of that I am 99.999% sure.

As it doesn't appear to be htaccess or J! plugin related, the only other candidate would be your web server, either in the main httpd.conf, or some kind of mod_security type deal.

Suggest you talk to your provider, see if there's anything on that web server which could potentially redirect POST calls via AJAX.

-- hugh


Hi Hugh,

Ok I was able to solve these issues. Problem wasn't 1000% not fabrik ! But the Infomaniak server. Support team was in fact unable to reproduce these issues so I will have to change my host.

Meanwhile, I tried to install the same database and files on an 1and1 server and it works like a charm.

Thanks again for you dedication and outstanding support.

Cheers,

Marc
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top