Problems, need help? Have a tip or advice? Post it here.
11 posts Page 1 of 2
Hi there,
I'm having trouble with KCfinder. Whenever I try to upload a picture, I get the error in the picture below. I am using the latest version of Couch CMS.
I changed php versions, configured php.ini but the issue doesn't solved. Is there any one have same problem?

Attachments

Hi,

Please take a look at your browser's dev console; is something being reported there?
Also try finding your web server's error log and see if it shows something that might help.
Hi KK,
I looked at dev console and there are 2 warnings;

jquery.js:18 [Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.
send @ jquery.js:18

helper.js:85 Uncaught TypeError: Cannot read property 'length' of null
at Function._.inArray (helper.js:85)
at Object.<anonymous> (joiner.php?v=3.12d:611)
at Function.each (jquery.js:16)
at joiner.php?v=3.12d:608

I also realized that I only get this error in Chrome. I try to use KCFinder on Edge, firefox or safari and there is no problem. I can upload images successfully.
It's much easier to bring the log to you, instead of going to find that php server log somewhere.

Myself, I have this pane that shows log if something is in there and even displays a button-form to clear it! Very handy. If anyone likes to have it, PM me.

Attachments

Hi @trendoman
I used your script and it displays no error :(
@gokmenbekar, there were a couple breaking changes that Chrome 83 introduced.
I have pushed a fix to GitHub. I request you to please try it on different browsers to see if this works and does not break anything existing.

Do let me know.
Hi KK,
I applied the changes on Github and it is working fine now. Also, no problem appears in Chrome, Edge, Firefox and Safari browsers.
Thank you very much for your interest.
Thank you :)
trendoman wrote: It's much easier to bring the log to you, instead of going to find that php server log somewhere. Paste this helper func on page, then call it as in @example
Code: Select all
<cms:func 'php_show_log'><cms:ignore>
    /**
    *   Finds the path to PHP ErrorLog and Prints it.
    *   Path recovered from PHP Settings.
    *
    *   @example <cms:call 'php_show_log' />
    *   @author Anton aka Trendoman &lt;tony.smirnov@gmail.com&gt;
    *   @date   24.02.2019
    *   @last   22.05.2020
    */
    </cms:ignore>
    <cms:php>
        $php_log = ini_get('error_log');
        if( file_exists($php_log) === TRUE ) echo @file_get_contents( $php_log );
    </cms:php>
</cms:func>



Myself, I have this pane that shows log if something is in there and even displays a button-form to clear it! Very handy. If anyone likes to have it, PM me.


@trendoman - I was able to solve my issue with the github fix, however I would like to implement this for future use as it seems very helpful. Just a bit lost, what page should I paste this to and how exactly would I call it? Any chance you can do a quick step by step? Much appreciated.
11 posts Page 1 of 2