How To Recover CSS Rules From A Corrupted CSS File - css

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.

Related

WP File Manager - Cannot view PDF

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

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/

external CSS sheet not loading to hosting

I'm having trouble making my CSS external stylesheet work in my actual hosting. It all works fine when I open the files from my Finder (I'm using a mac), but the stylesheet does not seem to load to my server properly. All other html files load fine and are visible when you visit my website in any browser,this is my website and the File Manager on my cPanel indicates that the CSS folder and external stylesheet file have been successfully uploaded for enough time that the style features should display. I tried clearing my browsing history and reopening my browser.
My link tag is and I have tried it using aswell as with just "css/socialpolarities.css". I've checked to make sure the spelling is right on the path and corresponds to the actual file.
Is the answer to just put all the style files in the public_html folder and then just change the path on all my html files? Or am I missing something?
I'm also using LiquidWeb if that means anything
The file css/socialpolarities.css seems to exist, but is void of content.
try looking at your local file to make sure it is indeed the one with the css code, then upload it to the same folder and override the original one.
You may have had an upload error.
I got it! The problem was actually that I needed to put the css file in the home directory, for some strange reason. My path from my html files definitely specified that the css files were in a css directory so I'm not sure if it's something I did wrong or whether the cPanel just sucks. Regardless, it works so I won't mess with it. Now time to copy all of my webfont files into my home directory...this is going to be messy lol.
Check your permission. They should be 755. You can search about permissions on internet. I changed the permissions and it worked fine.

Where does WebMatrix save the site configuration?

I have a website saved in Dropbox folder and I successfully worked on it for days without any problems with publishing. When I opened that site today in WebMatrix on another computer, I had to configure publishing settings again off course. I did that and tried to publish the site with only one file modified, but I was surprised when I saw all files in the publish dialog marked for upload.
One thing came to my mind - to copy site configuration from first to second computer so that second computer has information about already uploaded files and continues to publish just the modified ones, but I don't know if the site configuration is stored in file or registry or something else...
So, before I start digging I decided to ask the wise ones here :)
I found it in following location:
C:\Users\Username\Documents\IISExpress\config\PublishUI
When you try to make a new publish setting there is a link where you can say you want to import old settings. This looks for files with an extension called .PublishSettings or .XML, so I would start by searching your pc for files with that extension. I would imagine the .xml file would have your sites name in it's filename, so that is worth a shot as well :)
This should be enough. If not I am looking forward to hearing what others say or you can dig up yourself.

Loading a video from the local file system

I have a swf that is run from C:/ in the browser instead of a server (long story) and that swf loads a video that it located at ../../videos/video in relation to that swf.
Problem is, When I run it in Flex, everything is cool. Running locally, it can't find the file (not a security error) and is throwing a connectionError.
Any ideas?
NOTE: This seems to be a Windows specific problem, it's running on my mac with the same security settings just fine.
Flex Builder has a file that it adds all of your bin directories to in order to allow the debug player to get around the local security restrictions.
Here's a blog post on the subject.
Essentially Flexbuilder tells Flash that it should trust the bin folder... if you do a search on your development machine for the file flexbuilder_plugin.cfg, you should find it in a folder called FlashPlayerTrust in roughly the same area you normally find SharedObject files. If you open this file in a text editor, you should see pretty much every path to every bin folder for every flex project you have ever worked on. And suddenly everything gets so much clearer.
You can do as fenomas suggests and add any directory to your trusted list. You can also follow the advice from the above blog post.
So I created a new file and placed it next to this flexbuilder_plugin.cfg file, and called it MyProggy.cfg. Flash is configured to read in all files in this folder and parse all paths out of it, and any applications run from these paths will be considered "localTrusted" and will act as they would when run from Flexbuilder. Inside this text file I put one line: "c:\program files\my proggy" and saved it. I then had to restart Firefox for the change to take effect. I also had added a text label to my application and bound the text property to {Security.sandboxType}.
I would suggest getting HTTPFOX for Firefox which is a sniffer. Then you can see what is failing. In my own search I found that FLV's are always relative to the SWF, even when loaded on the WEB. Every asset that I have loaded is relative to the index.html file except for FLV's which always remain relative to the SWF. Being able to watch the data flowing, or attempting to flow to your site is invaluable.
This also explains why some people have no issue loading thing locally but then run into problems on the web. If their html file that is loading the swf is in a different location than the swf then every asset other than FLV's have a different relative path when viewed online then they do when viewed locally.

Resources