Hi there,
I’m using your front-end add-on and also the OneDrive add-on, but it doesn’t seem to work.
The config is all correct as it opens the window to our OneDrive account and allows you to select a file, but then it redirects back to the parent page after rather than the ‘?adb_page=add-new’.
I’m wondering if it’s to do with the redirect URL’s options in OneDrive as they don’t allow you to include query args in the URL so it’s redirecting back to the stripped URL.
If that is the case, does that mean the OneDrive add-on doesn’t work with the front-end editing?
Thanks
Will
Hello WPDM Support,
We’d like to supply you with some further information about an issue reported to you before Xmas last year about your Download Manager Plug In. Yesterday we updated your plugin and the following issue (included below) and previously reported to you occurred again. This time after applying our fix to your code the issue was not resolved with our fix. Therefore, we would like to tell you about our second fix to your code and ask if you can please investigate this issue which is causing your plug n to be incompatible with our WordPress / Themify installation.
Fix 2
——
This fix is similar to the first one but has been applied in this file: class.Package.php.
Around line 1319/1320 we have removed the call to wp_reset_query() and replaced it with: wp_reset_post_data().
The previous reported fault and our fix which incidentally still needs to be applied in addition to this new one follows:
Previously Reported Issue
———————————–
We have identified a fault with Download Manager and are sending you this short report to assist you in resolving the issue which starts with some background information about how it used to work and how we are using WPDM with Themify theme, finally we have fixed the problem but would like to know if our fix is compatible with a future update to WPDM.
1) The expected & actual behaviour prior to a recent update of Themify / WordPress
1.1) We add the [wpdm_package] shortcode in this form: [wpdm_package id="6239" template="55c1e8d58c991”] to posts.
Inline image 2
1.2) We then set Themify to include posts to a page using the Query Posts facility.
Inline image 3
1.3) What we expect to happen.
Prior to a recent update to Themify or WPDM (we’re unsure which one has caused the problem) the short code that was added to the post using the Query Posts facility would render the download package to the screen and the page content would finish. Obviously, because the shortcode is the last item of content in the included post.
The issue
————-
2) After a recent update the content no longer finishes at the end of the last included post and the additional content included via the embedded short code. Instead the content of the page that includes the posts is added to the end of the page after the last post / embedded shortcode.
2.1) Our FIX!
We’ve replaced the call to wp_reset_query() with wp_reset_postdata() and the duplicate page content is no longer added at the end of the page. See below for reference to approx line 360 in class.ShortCodes.php
function Package($params)
{
extract($params);
if(!isset($id)) return ”;
$id = (int)$id;
if(get_post_type($id) != ‘wpdmpro’) return ”;
$postlink = site_url(‘/’);
if (isset($pagetemplate) && $pagetemplate == 1) {
$template = get_post_meta($id,’__wpdm_page_template’, true);
$wpdm_package[‘page_template’] = stripcslashes($template);
$data = wpdm_fetch_template($template, $id, ‘page’);
$siteurl = site_url(‘/’);
return “<div class=’w3eden’>{$data}</div>”;
}
$template = isset($params[‘template’])?$params[‘template’]:get_post_meta($id,’__wpdm_template’, true);
if($template == ”) $template = ‘link-template-calltoaction3.php’;
$html = “<div class=’w3eden’>” . \WPDM\Package::fetchTemplate($template, $id, ‘link’) . “</div>”;
wp_reset_postdata();
//wp_reset_query();
return $html;
}
If this was the source of the problem please can you update your source code so that your next update to WPDM doesn’t remove our fix.
Thanks in advance.
—