Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rich Filemanager Does Not Work on IIS #983

Open
eSilverStrike opened this issue Nov 7, 2019 · 0 comments
Open

Rich Filemanager Does Not Work on IIS #983

eSilverStrike opened this issue Nov 7, 2019 · 0 comments
Labels
Bug An issue describing unexpected or malicious behaviour.
Milestone

Comments

@eSilverStrike
Copy link
Member

Related to #806

Geeklog v2.2.1 websites that use IIS (tested on IIS7 and 8) will get the following error when they attempt to launch the RIch Filemanager

"CLDR files for "en" language do not exist!" in a red box. The loading icon is still being animated but the javascript execution has stopped with the following error:

Please note with line numbers: filemanager.min.js is actually switched with the non minimized version:

ReferenceError: request is not defined filemanager.min.js:369:6
    localize http://192.168.0.102/filemanager/src/js/filemanager.min.js:369
    k http://192.168.0.102/filemanager/src/js/libs-main.js:2
    fireWith http://192.168.0.102/filemanager/src/js/libs-main.js:2
    f[0] http://192.168.0.102/filemanager/src/js/libs-main.js:2
    k http://192.168.0.102/filemanager/src/js/libs-main.js:2
    fireWith http://192.168.0.102/filemanager/src/js/libs-main.js:2
    c http://192.168.0.102/filemanager/src/js/libs-main.js:3
    b http://192.168.0.102/filemanager/src/js/libs-main.js:3

The file libs-main.js is minimized and very large. It is too difficult for me to debug to see what is going on.

The code actually errors out here:

\public_html\filemanager\src\js\filemanager.min.js

on the line:

return [].slice.apply(arguments, [0]).map(function (result) {

Here is more of the code

            .then(function() {
            	// trim language code to first 2 chars
				var lang = langModel.getLang().substr(0, 2),
                    //baseUrl = fm.settings.baseUrl;
					baseUrl = 'http://192.168.0.102/filemanager';

                return $.when(
                    $.get(baseUrl + '/libs/cldrjs/cldr-dates/' + lang + '/ca-gregorian.json'),
                    $.get(baseUrl + '/libs/cldrjs/cldr-numbers/' + lang + '/numbers.json'),
                    $.get(baseUrl + '/libs/cldrjs/cldr-core/supplemental/likelySubtags.json'),
                    $.get(baseUrl + '/libs/cldrjs/cldr-core/supplemental/timeData.json'),
                    $.get(baseUrl + '/libs/cldrjs/cldr-core/supplemental/weekData.json')
                ).fail(function () {
                    fm.error('CLDR files for "' + lang + '" language do not exist!');
                }).then(function () {
                    // Normalize $.get results, we only need the JSON, not the request statuses.
                    return [].slice.apply(arguments, [0]).map(function (result) {
                        return result[0];
                    });
                }).then(Globalize.load).then(function () {
                    globalize = Globalize(lang);
                });
            });

I have tested the code and those files in the code exist and I can load them from my browser directly fine. For some reason the jquery when and get functions cannot load the files under IIS (with Apache it can).

./libs/cldrjs/cldr-dates/en/ca-gregorian.json

I also posted about this issue at the Rich Filemanager repository: psolom/RichFilemanager#397

Hopefully they will come up with a fix eventually. Anyways not many sites use IIS so we will ship Geeklog v2.2.1 with a note that unfortunately the Rich Filemanager currently doesn't work for IIS.

When the Rich FIlemanager gets updated we should review and test this issue again to see if support for IIS has been fixed.

@eSilverStrike eSilverStrike added the Bug An issue describing unexpected or malicious behaviour. label Nov 7, 2019
@eSilverStrike eSilverStrike added this to the 2.2.2 milestone Nov 7, 2019
@eSilverStrike eSilverStrike modified the milestones: 2.2.2, Future Jan 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug An issue describing unexpected or malicious behaviour.
Projects
None yet
Development

No branches or pull requests

1 participant