Sub folders in folder tree not appearing
-
Hi
I had a previous version of MLF (not pro). After upgrading to the latest version of WP, I upgraded the MLF plugin as well.
Now, I can see the folder tree correctly, but not the sub folders. The cPanel shows the correct folder structure as before under ‘Uploads’. I haven’t messed around there.
As per the FQA “Folder Tree Not Loading”, I followed all the steps… My steps are in CAPS below.
Install the latest version of Media Library Folders. – DONE.
Deactivate Media Library Folders – DONE
Activate Media Library Folders Reset – DONE.
Run the Reset Database option from the Media Library Folders Reset sub menu in the dashboard.” -> I cannot see the MLF Reset sub menu in the dashboard.Am I missing something or do I need do perform any other actions.
Thanks for the great plugin.
Cheers,
Manoj
-
Ok, so I uninstalled the MLF plugin and re-installed and activated MLF. Folder structure still doesn’t show sub folders.
I, then, did as per the FAQ and this time I could see MLF Reset in the dashboard. I reset the DB as instructed.
“Deleteing mgmlp_folders
Removing mgmlp_media_folder posts
Done. You can now reactivate WordPress Media Library Folders.”Before resetting, I checked the DB and it does show the sub folders with correct parentage.
After resetting the DB, I deactivated MLF Reset and activated MLF. But again, it still doesn’t show the sub folders. I tried “Check for new folders” and to “Sync” a parent folder which has sub folders, but to no avail.
Am I missing anything?
BTW, if I copy an image using cPanel to a parent folder and then use Sync in MLF, the new image shows up, but still no sub folders. And, if I try to create a sub folder in a parent, it doesn’t show up in MLF but in cPanel, it has created a sub folder. And, I can’t see the default MM sub folders under YYYY parent folder. :-/
Cheers,
Manoj-
This reply was modified 6 years, 3 months ago by
manojmp450.
-
This reply was modified 6 years, 3 months ago by
manojmp450.
Hi Manoj
If you open Mlf it should normally show a list of folders without the subfolders. To show the subfolder within the base folder you need to click on the arrow in front of the basefoldername. It appears to me that you do not see the small arrow. Is this the case? Have a look at the plugin folder to see if the images are present and the folder has the proper access rights. Or you are running into a java problem. Are there any errors in the WordPress debug.log?
Hi Peter,
Thank you for the response.
To answer the first question, yes, I can see the tree with only the parents with the white triangle/arrow and closed folder icon. When I click on the arrow/white triangle, it changes to black triangle and open folder icon. But the sub folders do not show.The debug option provided more information. I enabled debugging/log and generated the debug.log file.
While syncing MLF on the Uploads folder (top most folder), I got the following error as a pop up.
<div id=”error”><p class=”wpdberror”>WordPress database error:[Duplicate entry '8305' for key 'PRIMARY']<br />
INSERT INTOwp_mgmlp_folders(post_id,folder_id) VALUES (8305, '8430')</p></div>{“phase”:”3″,”message”:”Adding woocommerce-placeholder.png”}I deactivated MLF, activated MLF Reset and checked the folder DB. There existed an entry for 8305 already and I guess this is why it gives this error. (This happened for 6 files, including non image files, which were in the Uploads folder. I moved them to a separate folder. The pop-ups didn’t show up after this, but still no sub folders.)
After resetting the DB, when I try to see Folder DB, I get the error “WordPress database error: [Table ‘i3806984_wp2.wp_mgmlp_folders’ doesn’t exist]”. This is normal I believe since it has cleared the folder db.
Now.. after Reset DB, when I go back to MLF Library, it shows the following error repeatedly, I guess for every image in the library. And no folder tree at all.
Notice: Trying to get property ‘attached_file’ of non-object in /home/<user>/public_html/wp-content/plugins/media-library-plus/maxgalleria-media-library.php on line 2272
WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ” at line 4]
select post_title, ID, wp_mgmlp_folders.folder_id from wp_posts LEFT JOIN wp_mgmlp_folders ON(wp_posts.ID = wp_mgmlp_folders.post_id) where ID =In MLF Reset, the folder db exists but without any data, just column headings.
Sorry about the long text, but I just wanted to provide everything I could to help get a solution. I’ll try to delete and re-install the plugin.
Regards
ManojThat is not good if you get duplicate entries. Make sure that all mgmlp tables are removed after removing the plugin. After selection of the subfolder, the images present in the subfolder should be read from the database. If the table is corrupted, then the data cannot be shown.
Ok, are the mgmlp tables stored at a different location and not at public_html/wp-content/plugins//media-library-plus? This directory in cPanel was deleted when I deleted the plugin.
After re-installing, I am basically back to square one. No sync errors, debug.log is clean, folder db in MLF Reset shows a proper table, but still no sub folders. The worst part is, even if I create a new folder under Uploads using MLF, it doesn’t even show this new folder but in cPanel the new folder has been created. :-/
Edit: I created a folder in cPanel and then “check for new folders” in MLF. It says it has added the new folder but the tree doesn’t show it. If I try to create a new folder in MLF with the same name, it correctly says the folder exists. So the plugin is able to recognise the folders but the tree just doesn’t show it.
-
This reply was modified 6 years, 3 months ago by
manojmp450.
-
This reply was modified 6 years, 3 months ago by
manojmp450.
-
This reply was modified 6 years, 3 months ago by
manojmp450.
Hi
The tables I indicated are within the database!
How is WordPress setup?
You need to change the setting for Media storage. Standard WordPress stores the files in folders based on month/year. That should be altered to not do that.Hi
Another suggestion to see where it goes wrong is to disable all your other plugins.
Then check if the folder tree is shown. If that is the case then enable your plugins one by one. If that does not solve your problem, you could test again with another Theme.manojmp450,
Can you visit the Support page of Media Library Folders on your site and go to the System Information tab which displays information about the configuration of your site where you can highlight, copy and paste this information into an email and send it to me at alan@maxfoundry.com?
Also note that duplicate entry is not a serious error as it is only trying to add the same record twice and it only needs one record. This issue will be fixed in the next release of the plugin.
Hi Peter / Alan,
“That should be altered to not do that.” Done.
“Disable all plugins and check” Done. Subfolders still don’t appear.
“Another theme” That may be difficult. Too much effort spent on current one.
“duplicate entry is not a serious error”. Agree. I hoped the “Reset folder db” would have sorted that out though. But its not a problem now as I’ve moved the files that were causing the issue elsewhere.I will send the system information soon.
Thanks for the help guys.
Regards
Manoj-
This reply was modified 6 years, 3 months ago by
manojmp450.
-
This reply was modified 6 years, 3 months ago by
manojmp450.
Hi Manoj
Question did you set up WordPress to use a different folder instead of “uploads” ??
Second test you could do is the following
1. Store a proper image within a subfolder with ftp
2. Perform a mlf reset
3. Start mlf again and wait until it is finished.
4. Open the standard Media library
5. Check if the image in the subfolder is shown in the standard Media library.
If that is the case, then the problem lies in the presentation of the folder structure.
Which PHP version are you running on?
I encountered problems with version 7.3 due to the major changes they made. I had to revert it to 7.2 to make my site running properly again.Hi Peter,
I’ll try out what you say today.
But I have PHP v7.3.13. So that could be it.
I’ll post what happens.Thanks.
Regards
ManojHi Peter,
I just reverted the PHP version to 7.2.
The MLF plugin shows all the subfolders, new folders and their respective content.
I believe the plugin looks like it is operating like before.Thank you very much (and Alan as well) for your time and persistence on this issue. I greatly appreciate it.
Cheers
ManojHi Manoj
Glad that we have found a solution for you
But it means that Alan needs to investigate this further, because otherwise the plugin becomes unusable when updating to a higher PHP version.
Thanks for you willing to perform the testing!
Regards,
PeterOk Peter, your observation about PHP 7.3 is noted. I’ll have to find a test site that uses that version.
-
This reply was modified 6 years, 3 months ago by
The topic ‘Sub folders in folder tree not appearing’ is closed to new replies.