I ran into this issue. Resolved by updating Downloads -> Settings -> Access Settings -> File Browser Root so that it points to wp-content/uploads/download-manager-files/
.
Note that when you hover on the little question mark beside the title of the setting (File Browser Root:(?)) it says not to add a trailing slash, but it only works for me with a trailing slash.
Thanks
The notice is triggered by ln 17 of class.Search.php:
if ( $title ) echo isset($before_title) ? $before_title : "" . $title . isset( $after_title ) ? $after_title : "";
It probably has to do with PHP 7.4 deprecating left-associative ternary operator.
Thanks Shahriar,
That wouldn’t work in my case. I have WordPress installed in /public/wp/
using composer, and have moved wp-content/
to /public/wp-content/
. Something similar to Bedrock.
Hi Shahriar,
I’m using the [wpdm_package]
shortcode to show a download button on the front page. When I restrict the package, users that aren’t logged in get sent to my-site.com/wp-login.php
which returns a 404.
When I update line 248 of class.Package.php
to either of the following…
$post_vars['download_url'] = wp_login_url( urlencode($_SERVER['REQUEST_URI']) );
$post_vars['download_url'] = site_url('/wp-login.php?redirect_to=' . urlencode($_SERVER['REQUEST_URI']));
logged out users are directed to my-site.com/wp/wp-login.php
which is correct.
I was able to reproduce the notices in wpdm-login-form.php
on a fresh install:
PHP 7.3
WP 5.2.4
Download Manager 5.0.2
WPDM Archive Page 3.0.1
WPDM Default Values 1.7.1
Set up a page with the shortcode [wpdm-archive button_style="default" items_per_page="20" order_by="title" order="asc" login=1]
. Visiting this page causes the notices.
With the Query Monitor plugin active I’m also getting PHP Errors in Ajax Response on the backend:
On Settings -> Updates
{…}
component: "Plugin: download-manager"
file: "wp-content/plugins/download-manager/admin/tpls/settings/addon-update.php"
line: 78
message: "Undefined index: download-after-submit"
stack: Array(3) [ "WPDM\\a\\m\\Settings->pluginUpdate()", "WPDM\\a\\m\\Settings->loadSettingsPage()", "do_action('wp_ajax_wpdm_settings')" ]
type: "notice"
<prototype>: Object { … }
query-monitor.js:324:14
{…}
component: "Plugin: download-manager"
file: "wp-content/plugins/download-manager/admin/tpls/settings/addon-update.php"
line: 78
message: "Undefined index: wpdm_api"
stack: Array(3) [ "WPDM\\a\\m\\Settings->pluginUpdate()", "WPDM\\a\\m\\Settings->loadSettingsPage()", "do_action('wp_ajax_wpdm_settings')" ]
type: "notice"
<prototype>: Object { … }
query-monitor.js:324:14
{…}
component: "Plugin: download-manager"
file: "wp-content/plugins/download-manager/admin/tpls/settings/addon-update.php"
line: 78
message: "Undefined index: multilevel-marketing"
stack: Array(3) [ "WPDM\\a\\m\\Settings->pluginUpdate()", "WPDM\\a\\m\\Settings->loadSettingsPage()", "do_action('wp_ajax_wpdm_settings')" ]
type: "notice"
<prototype>: Object { … }
query-monitor.js:324:14
On Settings -> Frontend Access:
{…}
component: "Plugin: download-manager"
file: "wp-content/plugins/download-manager/admin/tpls/settings/frontend.php"
line: 127
message: "in_array() expects parameter 2 to be array, bool given"
stack: Array(4) [ "in_array()", "WPDM\\a\\m\\Settings->Frontend()", "WPDM\\a\\m\\Settings->loadSettingsPage()", … ]
type: "warning"
<prototype>: Object { … }
query-monitor.js:324:14
I’m on version 5.0.2 with all the add-ons up to date and have a few undefined variables and indexes:
PHP Notice: Undefined index: page_template in /public/wp-content/plugins/wpdm-default-values/wpdm-default-values.php on line 69
PHP Notice: Undefined index: template in /public/wp-content/plugins/wpdm-default-values/wpdm-default-values.php on line 71
PHP Notice: Undefined variable: regurl in /public/wp-content/plugins/download-manager/tpls4/wpdm-login-form.php on line 114
PHP Notice: Undefined variable: log_redirect in /public/wp-content/plugins/download-manager/tpls4/wpdm-login-form.php on line 120
PHP Notice: Undefined variable: log_redirect in /public/wp-content/plugins/download-manager/tpls4/wpdm-login-form.php on line 149
Hi Shahriar,
With the newsletter plugin there doesn’t seem be be way to automate new package notifications.
The functionality I’m looking for is this: I add a new new package then users automatically received a notification with the new package name.
Is this possible?
Thanks