• Resolved ecommonist

    (@ecommonist)


    im getting this
    nginx in centos 7, i tried mmm-file-list plugin and this at least is listing files, so no problem with permissions i guest

    PHP message: PHP Notice: Undefined index: d in /usr/share/nginx/XXX_org/web/app/plugins/m1downloadlist/index.php on line 134
    PHP message: PHP Notice: Undefined variable: content in /usr/share/nginx/XXX_org/web/app/plugins/m1downloadlist/index.php on line 281″

    • This topic was modified 7 years, 5 months ago by ecommonist.
Viewing 15 replies - 1 through 15 (of 20 total)
  • Plugin Author maennchen1.de

    (@maennchen1de)

    Hi!
    Please could you tell us the installed PHP-version and m1.DownloadList version?

    Thread Starter ecommonist

    (@ecommonist)

    7.1.9 i think
    and 0.11 m1

    • This reply was modified 7 years, 5 months ago by ecommonist.
    Plugin Author maennchen1.de

    (@maennchen1de)

    Hi!
    I found it and it will be fixed in the next release.
    You can disable this notice message by editing wp-config.php:
    change: define(‘WP_DEBUG’, true);
    to: define(‘WP_DEBUG’, false);

    Thread Starter ecommonist

    (@ecommonist)

    i need to work it out, not only silence the message. Plugin doesn’t work at all right now. You can tell me where to edit, I work in the business.

    Plugin Author maennchen1.de

    (@maennchen1de)

    Hi!
    Does this help?

    index.php @@ -138,11 +138,11 @@
             $dirname.= $subdir;
             
         }
    +    
    +    $content = '';
     
         if (is_dir($dirname)) {
    -		
    -    	$content = '';
    -    	
    +
         	if ($atts['nobreadcrumb'] == '1') {
    Thread Starter ecommonist

    (@ecommonist)

    of course, i’ll test it tomorrow. Thank you very much!

    Thread Starter ecommonist

    (@ecommonist)

    Still showing PHP message: PHP Notice: Undefined index: d in /usr/share/nginx/XXX_org/web/app/plugins/m1downloadlist/index.php on line 134

    content error has gone, after moving the line

    Plugin Author maennchen1.de

    (@maennchen1de)

    Thanks for your reply. I’ll check it out.

    Plugin Author maennchen1.de

    (@maennchen1de)

    Sorry, here is the right fix:

    --- m1downloadlist/trunk/index.php	2017-10-23 08:21:28 UTC (rev 1750978)
    +++ m1downloadlist/trunk/index.php	2017-10-23 08:22:15 UTC (rev 1750979)
    @@ -71,6 +71,9 @@
     	if(!array_key_exists('filetype', $atts)) $atts['filetype'] = "";
     	if(!array_key_exists('noext', $atts)) $atts['noext'] = "";
     	if(!array_key_exists('nobreadcrumb', $atts)) $atts['nobreadcrumb'] = 0;
    +	if(!array_key_exists('d', $_REQUEST)) $request['d'] = "";
    +	if(!array_key_exists('m1dll_index_get', $_REQUEST)) $request['m1dll_index_get'] = "";
    +	
     	//define atts end
     
         $m1dll_fileicon  = array(
    @@ -131,10 +134,10 @@
         	
         }
         
    -    if ($_REQUEST['d'] && $_REQUEST['m1dll_index_get'] == $m1dll_index) {
    +    if ($request['d'] != ""  && $request['m1dll_index_get'] == $m1dll_index) {
             
             //path from URL
    -        $subdir = str_replace("..","",base64_decode(rawurldecode(strip_tags($_REQUEST['d']))));
    +        $subdir = str_replace("..","",base64_decode(rawurldecode(strip_tags($request['d']))));
             $dirname.= $subdir;
             
         }
    Thread Starter ecommonist

    (@ecommonist)

    Errors are gone but i am unable to see folder content, I tested all possible paths and 777 permissions in folders, no errors, nothing shown. I was using bedrock wordpress boilerplate, and it using app path instead wp-content (already changed that as well).
    https://roots.io/bedrock/

    php is 7.1.10 and nginx 1.12.1 with php-fpm
    Maybe is completely out of you target and scope so I’ll understand if you pass on this as long as the plugin works for regular wordpress and users.

    Best regards and thank you for your effort ??

    Plugin Author maennchen1.de

    (@maennchen1de)

    Please take a look at the shortcode examples, if you want to display a modified structure:

    1. displays content of wp-content/uploads/: [m1dll]
    2. displays content of your/foldername/here/: [m1dll path=”your/foldername/here/”]

    Just use 2.) instead of 1.).

    Thread Starter ecommonist

    (@ecommonist)

    Yep, that was my initial configuration using path, yesterday i tried with/without other paths params.

    Hi meannchen1 and ecommonist!

    This great plugin is 98% what I wanted. Many thanks!

    But in the current version 0.12 navigating through folders is not working. With your latest change (2017-10-23 08:21:28) described above you removed the $_REQUEST[‘d’] from the listing loop completely.
    Former version with
    $subdir = str_replace("..","",base64_decode(rawurldecode(strip_tags($_REQUEST['d']))));
    generates folder paths that are working, but in file path it gives an additional slash /

    If I only could repair this for everybody; but already took me hours to get to this point here. maennchen1 if you would take over from here, it would been worth every minute…

    Many thanks in advance! Good night!

    • This reply was modified 7 years, 4 months ago by calusp. Reason: formatting
    Plugin Author maennchen1.de

    (@maennchen1de)

    My fault. #0.12 shouldn’t be an official update.
    #0.13 fixed the issues above. Sorry for any inconveniences!

    Many thanks for the quick support! Still there was this shlash “/” issue.

    the description is saying path=”your/foldername/here/”,
    with path=”wp-content/uploads/here/”
    but this gives me: domain.com/wp-content/uploads//here/filename.pdf

    For me path=”wp-content/uploads/here”
    works good.

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘undefined index’ is closed to new replies.