FRANCK ANTHONIOZ

Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)
Oct 11, 2023 at 10:35 am
#190587
Participant
FRANCK ANTHONIOZ
OP

The problem is now resolved by adjusting the code line.
But I guess the issue becomes from something else as the meta_key __wpdm_fileinfo does not exist in the database for this post.
Maybe something went bad while uploading the image ?
Please, add this line code on the next version of the plugin : it won’t fix the main issue but it will prevent from a fatal error.

Oct 11, 2023 at 10:04 am
#190584
Participant
FRANCK ANTHONIOZ
OP

Nayeem,

While debugging, the variable $fileinfo is empty because in the database table postmeta, the meta_key __wpdm_fileinfo for this post ID does NOT exists.
$fileinfo is a string variable, and not an array. So on line 639, it breaks !
I fixed the issue like that :

File : /wp-content/plugins/download-manager/src/Package/FileList.php
Added this code at line 587
if(empty($fileinfo)) $fileinfo = [];

Oct 11, 2023 at 9:51 am
#190583
Participant
FRANCK ANTHONIOZ
OP
This reply has been marked as private.
Mar 31, 2022 at 1:25 pm
#170639
Participant
FRANCK ANTHONIOZ
OP

I’m not sure to understand perfectly.

This block is totally useless ?

Mar 31, 2022 at 12:09 pm
#170634
Participant
FRANCK ANTHONIOZ
OP

Hi Nayeem,
No, we have created some categories (edit-tags.php?taxonomy=wpdmcategory&post_type=wpdmpro)
Each package is in a category.

The category “Press release” should not be accessible by users having the role “Media” (when editing a category, in the block “access”, the role “media” is not checked).

On the frontend, we have a made a page, with this code :

$args = array(
	'taxonomy' ► 'wpdmcategory',
	'orderby' ► 'name',
	'order'   ► 'ASC',
	'parent'   ► 0,
	'hide_empty' ► 0,
);
$cats = get_categories($args);

But all the categories are displayed, even if I’m logged with an account having the role “Media” (“Press release” should not be returned by the query).

Maybe we need to add some controls, please let us know.

Viewing 5 posts - 1 through 5 (of 5 total)