Giter Club home page Giter Club logo

Comments (31)

creativecat avatar creativecat commented on July 18, 2024

Are those scripts missing also in the media?
I have to check the lib_jquery/ and the get_page_headers();

from blackcatcms.

creativecat avatar creativecat commented on July 18, 2024

Do you have lib_jquery 1.32 installed? If not please install the current version. I guess, your problem could be caused by a broken JS...
The jsadmin.js seems to be called by MPForm.. I have to contact Frank to get info about this problem...

from blackcatcms.

digitalbricks avatar digitalbricks commented on July 18, 2024

I will do a clean install for testing these days – to eliminate errors that are caused because of just replacing old files with the new ones.

from blackcatcms.

creativecat avatar creativecat commented on July 18, 2024

Did you already make a clean install? I've tested different systems and can't confirm this problem.

from blackcatcms.

webbird avatar webbird commented on July 18, 2024

Tried it with my fresh installation I made yesterday. Tested with Zips and Jpegs, also created a Jpeg with blanks in the name. Tested with 3 levels of subdirs. Cannot verify this problem. Tested with latest Firefox on Win7.

What browser is that? Maybe a Mac problem?

Edit: Maybe the modal window is caused by a directory permissions problem?

from blackcatcms.

webbird avatar webbird commented on July 18, 2024

Yepp. Can confirm this with directory set to read-only perms. (Everyone R, Administrators F)

from blackcatcms.

creativecat avatar creativecat commented on July 18, 2024

I can now confirm this bug. It happens when LEPTON_Helper_Upload is initialized.
Can't find a quick solution at the moment :-(
How about you webbird?

from blackcatcms.

creativecat avatar creativecat commented on July 18, 2024

Could be the same problem like mentioned here: http://www.verot.net/php_class_upload_forum.htm?php_class_upload_forum_id=1694

from blackcatcms.

webbird avatar webbird commented on July 18, 2024

Hmmm... will do some research. As a workaround, we could use is_writable() first to check if the directory is writable. Maybe disable upload button then. (?)

from blackcatcms.

creativecat avatar creativecat commented on July 18, 2024

I already tested "is_writable"... doesn't work.
It seems that the file doesn't exists. I get this error message:

An error occured:Local file doesn't exist

This message is thrown in Helper/Upload.php on line 714:

                    if ($this->uploaded && !file_exists($file))
                    {
                        $this->uploaded = false;
                        $this->error = 'Local file doesn\'t exist.';
                    }

from blackcatcms.

webbird avatar webbird commented on July 18, 2024

is_writable works for me. I added it to the ajax_get_contents.php as a return value. Now the JS can de-activate the upload button.

if ( is_dir( $load_path ) )
{
$ajax['is_folder']   = true;
    $ajax['is_writable'] = is_writable($load_path);
    ...

Now I just have to find out how/where to de-activate that button... ;)

from blackcatcms.

webbird avatar webbird commented on July 18, 2024

That part of Helper/Upload.php is for local files, not for uploaded files.

from blackcatcms.

creativecat avatar creativecat commented on July 18, 2024

I get this error message since I try to initialize the upload class by

$files      = $admin->get_helper('LEPTON_Helper_Upload', $_FILES[$file_name]);

from blackcatcms.

webbird avatar webbird commented on July 18, 2024

That's the syntax for local files. See the comment:

    /**
    * Constructor. Checks if the file has been uploaded
    *
    * The constructor takes $_FILES['form_field'] array as argument
    * where form_field is the form field name
    *
    * The constructor will check if the file has been uploaded in its temporary location, and
    * accordingly will set {@link uploaded} (and {@link error} is an error occurred)
    *
    * If the file has been uploaded, the constructor will populate all the variables holding the upload
    * information (none of the processing class variables are used here).
    * You can have access to information about the file (name, size, MIME type...).
    *
    *
    * Alternatively, you can set the first argument to be a local filename (string)
    * This allows processing of a local file, as if the file was uploaded
    *
    * @access private
    * @param  array  $file $_FILES['form_field']
    *    or   string $file Local filename
    */

from blackcatcms.

creativecat avatar creativecat commented on July 18, 2024

I loop through all files, so $_FILES[$file_name] is an array and should work:

$files      = $admin->get_helper('Upload', $_FILES[$file_name]);

Did I missed something?

from blackcatcms.

webbird avatar webbird commented on July 18, 2024

Just read the docs: Giving a FILENAME is treated as a local file. You will have to give the FIELDNAME (of the upload field) instead.

from blackcatcms.

creativecat avatar creativecat commented on July 18, 2024

It is the __FIELD__name. I will change the name of variable from $file_name to $field_name on next update. The value is the field name of the upload form.
Sorry for confusion.

from blackcatcms.

creativecat avatar creativecat commented on July 18, 2024

I get the error

Notice: Array to string conversion in /www/htdocs/w00f93e4/kunden/lepton2/upload/framework/class.wb.php on line 705

from blackcatcms.

webbird avatar webbird commented on July 18, 2024

Let's go some steps back and add the is_writable() check first. Maybe this solves both problems.

from blackcatcms.

creativecat avatar creativecat commented on July 18, 2024

Already tried it, but didn't solved the problem (I check is_writeable() in the backend/media/upload.php before I call the upload helper)...
So this definitely does not solve the problem. One problem seems to be located in the int_get_handle() (see my previous post)

from blackcatcms.

webbird avatar webbird commented on July 18, 2024

PLEASE take the is_writable() solution I made, which is MUCH earlier. Checking is_writable() when giving a local file will never work.

from blackcatcms.

creativecat avatar creativecat commented on July 18, 2024

There are two problems:

  • One with the get_helper(); and the calling of the class.upload.php (see issue #45)
  • One with perform the upload script on local installation

We will first fix the first problem, after that we will hopefully find a easy solution to this problem

from blackcatcms.

creativecat avatar creativecat commented on July 18, 2024

This problem seems to be on local installation on Macs only. Could someone confirm this problem on a local installation on windows and linux?
Were you able to install Lepton2 without any errors? If you take a look on add ons - are e.g. all languages installed correct?

from blackcatcms.

webbird avatar webbird commented on July 18, 2024

I'm not sure if I understand you right. The installer on Mac creates a read-only media folder?

As said above, I can't confirm this for Win7/XAMPP. I had to tweak the NTFS permissions manually to get this error. Don't have a Linux environment at hand.

from blackcatcms.

creativecat avatar creativecat commented on July 18, 2024

It seems to be not a problem with permissions... I changed them to 0777.
I can't figure out, where the problem exactly occurs, but when creating the upload class I'm getting a blank page - without any error message (Error level is set to E_ALL&E_STRICT).

In my environment it also occurs when installing a fresh system. But thats another problem, that couldn't be figured out yet;-)

from blackcatcms.

webbird avatar webbird commented on July 18, 2024

Try XDebug.

from blackcatcms.

webbird avatar webbird commented on July 18, 2024

I have the problem now on blackcat-cms.org. As a workaround, I use the filemanager in CKE to upload files at the moment. So it's may not only a Mac problem.

from blackcatcms.

webbird avatar webbird commented on July 18, 2024

Hope I fixed this. Please check the next tagged release. (Should be 0.2.0)

from blackcatcms.

creativecat avatar creativecat commented on July 18, 2024

I found another small bug in this section: The folder url is not correct, when uploading a file. I will take a look on this small issue next week.

from blackcatcms.

webbird avatar webbird commented on July 18, 2024

This just happens at first try. Reason is that the hidden form field is updated AFTER the form is sent, so the file path is not correct. At next try, the right path is sent.

from blackcatcms.

webbird avatar webbird commented on July 18, 2024

I hope this is fixed, I am closing this issue now as the initial error is fixed, please open a new issue if new bugs occur. ;)

from blackcatcms.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.