FRANCK ANTHONIOZ

Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)
in reply to: Fatal error: Allowed memory size #190587

FRANCK ANTHONIOZ
Participant

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.

in reply to: Fatal error: Allowed memory size #190584

FRANCK ANTHONIOZ
Participant

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 = [];

in reply to: Fatal error: Allowed memory size #190583

FRANCK ANTHONIOZ
Participant
This reply has been marked as private.

FRANCK ANTHONIOZ
Participant

I’m not sure to understand perfectly.

This block is totally useless ?


FRANCK ANTHONIOZ
Participant

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)