undefined index
-
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 guestPHP 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 8 years, 8 months ago by
ecommonist.
-
This topic was modified 8 years, 8 months ago by
-
Hi!
Please could you tell us the installed PHP-version and m1.DownloadList version?7.1.9 i think
and 0.11 m1-
This reply was modified 8 years, 8 months ago by
ecommonist.
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);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.
Hi!
Does this help?index.php @@ -138,11 +138,11 @@ $dirname.= $subdir; } + + $content = ''; if (is_dir($dirname)) { - - $content = ''; - + if ($atts['nobreadcrumb'] == '1') {of course, i’ll test it tomorrow. Thank you very much!
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
Thanks for your reply. I’ll check it out.
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; }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 π
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.).
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 8 years, 7 months ago by
calusp. Reason: formatting
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.pdfFor me path=”wp-content/uploads/here”
works good. -
This reply was modified 8 years, 8 months ago by
The topic ‘undefined index’ is closed to new replies.