WP File Manager - Cannot view PDF - wordpress

I am working for a client and cannot seem to find the solution to this issue. When changing the file path for the root directory of the WP File Manager we can "lockdown" and specify that we want the /home/site_name/files folder for the users to see when logged in. The default file path is /home/site_name/ and I can view the PDF's in the files folder by navigating and opening them up.
But once I specify that I want only the contents in the /home/site_name/file to be viewed I can no longer open the PDF's, it will give me a 404 this page cannot be found. If I take this URL and add in the /files/file_name then it loads... there is some disconnect between the link and the file path and I cannot figure it out.
Let me know if anyone has seen this before while using Wordpress File Manager!
Thanks!!

Update: After contacting the developers of the plugin there was a known issue with it, now with the new version the bug is fixed

Related

How To Recover CSS Rules From A Corrupted CSS File

My .css file was working fine but today I noticed the website is not acting based on CSS rules so I tried to inspect the rues on browser and surprisingly I noticed the CSS file is empty!
I tried to open the style.css file in Notepad++ and this is how it looks like
I also tried to open the file in Bracket editor which I got this message
Can you please let me know if there is a way to fix this issue and retrieve the CSS rules from these NULs?
If your file is indeed corrupted, and you have site backups as part of your hosting plan, restore your website to a point where your file worked. (Many web hosts that offer backups will store 30 days' worth, depending on your hosting plan.)
If you don't have such a hosting plan, go to Wayback Machine and search for your URL. Pick a snapshot date when your site was working. Look in your source code and find a link to Wayback's cached version of your CSS file. Copy your CSS from there.
Alternatively, try searching for your website in Google. Unless you have noarchive tags on your site, there should be a link right in your search results to access a cached version of your site. If Google last crawled your site before your file got corrupted, you should be able to access your cached CSS file through the source code (or a link in Dev Tools).
Finally, check out this thread:
https://groups.google.com/forum/#!topic/brackets-dev/4hEn8qs9MKs
You may be able to open the file in a third code editor and save it as UTF-8.

WordPress : Media Library broken images

When I upload image to WordPress, they randomly appear as broken links.
I can drop the files on the Media Library or Select the files and some files are always shown as broken.
I can delete the files and re-upload the same group and different images in the group can show as broken.
I'm sure it's nothing to with the images as they sometimes appear as broken and then sometimes don't.
Locally the upload works fine, this problem started happening on the live hosting - I thought it could be something to do with permissions but then wouldn't it show all the images as broken and not show random images as broken.
I don't get an error but a broken image icon. If I click the broken link it case me to the Attachment Details page. Sometimes the image does appear here sometimes it doesn't.
Some things to look for:
1) check if there is an .htaccess file in the wp-content/uploads folder or wherever you keep your images (make sure you have the option to see hidden files--I think they're available by default when you're using an FTP client but if you're in the File Manager of your CPanel then you have to enable this option, either before entering file manager or from settings when you're in the file manager depending on your host). If there is an htaccess file, you'll want to back it up and then research more about this before you make any changes to it. https://codex.wordpress.org/htaccess_for_subdirectories
2) if you had tried to move your default image directory using wp-config.php make sure that has been set up properly
3) check folder and file permissions settings. it's best to do this in an FTP client because if you need to change the permissions, it can do it recursively and include all subdirectories and files within them instead of having to go through into each folder and change the permissions.
http://www.wpbeginner.com/wp-tutorials/how-to-fix-image-upload-issue-in-wordpress/

selecting path in chrome.fileSystem.chooseEntry

I'm trying to open a file in a Chrome packaged-app using chrome.fileSystem.chooseEntry() but I can't manage to make the dialog show a suggested filename (passed through suggestedName). That works ok if the file is in home path, but doesn't if I 'suggest' a file that's inside a folder in that same home folder. I'm on LinuxMint.
So:
chrome.fileSystem.chooseEntry({type: 'openFile', suggestedName: "~/log.txt"}, callback) ---> works! but,
chrome.fileSystem.chooseEntry({type: 'openFile', suggestedName: "~/foo/log.txt"}, callback) ---> doesn't! It just opens dialog showing home folder. Both file and folder exist.
This is by design. The file system API strips path information from the suggested name. Put another way, you can suggest a name but not a path.
We do this for security reasons; we want users to always be choosing the file. If your app has a legitimate reason to suggest a path please file a bug at http://crbug.com, describe your use case and cc me.

how to show an uploaded image on jsp page

when I am uploading an image into serverside, and saved in a specific folder. Then on the next page I have to show that uploaded image. But I cant show it using the html img tag . what is wrong with this?.Can any one help me to solve this problem?
You likely need to make sure that the folder that you are uploading the images is accessible through the web server your are using, this would mean both that it's location is mapped to something on the web server and also that the web server has permission to read the image files after they have been created.
I would start by looking to make sure that the files are actually showing up in the folder that you expect them to be in, and that they aren't being cleared out by something.
Second, check if you manually place an image in that folder if you can navigate to the url of the image. If you can't it likely isn't mapped or there is a permissions issue.
You can test to see if the URLs of the images are working. Instead of just checking it through an img tag, navigate to the URL directly and see if you get some kind of an error, this might help you troubleshoot the issue.

where does drupal save images when you use cck and imagecache?

I am thinking in moving all JS and images from webserver to another server to mitigate the load on my webserver. then i will use parallel module to get this stuff from the other server.
now, currently i am using cck and imagecache modules. and i dont know where does drupal save the images.
i checked mysql (files table) and found something like this
Mysql>select filepath from files limit 2;
sites/default/files/2010413132344592734_2.jpg
sites/default/files/2010491910913580_5.jpg
i checked for such files but i didnt find anything like this in this directory!!
i inspected one of the images in one of my articles and found that this image is in one of the cache folders that have been generated automatically by imagecache module. i tried to delete this image from server and refreshed my page, imagecache recreated it.
now where did imagecach get this image from? where does drupal save my images??
Thanks for your help
Imagecache takes source images from whatever path is set in the files table, which is generally sites/default/files, the directory you listed. Your imagecache directory was within that directory, right? I think your files are probably in that directory and you just missed them for some reason. Directory listing cached in your FTP client, maybe?
For myself, it stores everything in the sites/default/files folder.
But, some settings to look at...
The File system path setting, located at ?q=admin/settings/file-system
The path settings for the particular field. Open the settings for the particular field, and look in the File path setting in the Path Settings fieldset.
If those settings are different, your file may be somewhere else. Otherwise, it's going to be in your sites/default/files folder.
Check the following locations
[...]\htdocs\drupal\sites\default\files\field\image
[...]\htdocs\drupal\sites\default\files\styles\large\public\field\image
[...]\htdocs\drupal\sites\default\files\styles\medium\public\field\image
[...]\htdocs\drupal\sites\default\files\styles\thumbnail\public\field\image
where [...] is the location of the htdocs folder inside your webserver container.
If you are using xampp then it could be C:\xampp183\htdocs............
Hope this helps !
In the drupal database, check the table "file_managed" and the column "uri" (which gives the uri to access the file either local or remote).
You might find a value like below .. (ignore the jpg name , that is only for my setup)
public://field/image/8_mayurkotlikar_tigress5.jpg
This shows the location of the image.

Resources