Custom Tumblr theme wont save because of non-https urls? - html

So yesterday i was happily editing the theme of my tumblr blog and everything was working fine. Go into same blog to day and it brings up thsi when i click save:
"Un oh! We could't save your theme. Looks like your custom theme references assets from non-HTTPS Urls. Please try again using only HTTPS Urls."
Super confusing because not urls have been add since yesterday and everything was fine then. Same thing is happening with my other blogs with custom themes. I even went through and deleted all the urls on the html page just to see if it would do anything and the same alert came up. What is going on ??
Please help
Cheers

Just had the same problem. Tumblr updated their Encryption policies.
If you're a theme developer and you'd like to ensure your themes
support HTTPS, make sure that any externally hosted resources, such as
Cascading Style Sheets (CSS) or Javascript files, and even images, are
served using HTTPS.
As we now know that Tumblr requires that we use HTTPS instead of HTTP, here's how can we solve the error:
Make sure that you are in the customize section and access "Edit HTML":
In the "Edit HTML", press Ctrl+F (or press the Settings button and then "Find and replace"):
Search for "http" and Replace with "https" - apply that to all.
As the previous step can cause some links to be "httpss", this needs to be fixed. By accessing the Find and Replace and Search for "httpss" and Replace with "https".
The steps bellow should solve your problem. If they don't, see "Extra considerations" below, more specifically, point 1.
Extra considerations
I've done all the above, but it didn't solve my problem. What should I do?
When one has android-app://, for example:
<link rel="alternate" href="android-app://com.tumblr/tumblr/x-callback-url/blog?blogName=goncalomperes" />
One will need to add [https], as following:
<link rel="alternate" href="android-app:https://com.tumblr/tumblr/x-callback-url/blog?blogName=goncalomperes" />
As #mchid suggested in the comment, apart from android-app://, we will also need to do the above for: "//, ios-app://, and http-equiv.
Accordingly to Tumblr support:
Yet another update: SSL is now being turned on by default for ALL
Tumblrs that use our Official theme on the web. Even though we don’t
recommend it, you can still turn it off in your blog settings.
So changing the Encryption section to allow SSL should not be the problem.

Ok im a goose. Looks like tumblr has changed their requirements on http. I know it sounds obvious but i couldn't tell why it was happening on every theme apart from their default theme. The reason is you need to go in and change the tumblr links to css and java from http to https "http://static.tumblr.com/xlsgtjb/WEMoeha97/style.css becomes https://static.tumblr.com/xlsgtjb/WEMoeha97/style.css" If you still get the alert after this try searching for other urls and delete or change them to https

I have the same problem, and I thought all I have to do was changing the encryption to "Always serve blog over SSL" in the blog settings, like this: Blog settings, encryption
Apparently not, because the problem isn't just in the blog URL but also in the customization section.
So you need to enter the section, go through all the code, find the http URLs and change them into https URLs.

Before you begin, make a backup of your existing html in case there is an issue. There are a few ways to do this but I recommend doing both of the following.
First, select all in the Tumblr html editor and copy and then paste the contents into a text file text editor on your computer and save the file. This backup is preferred.
Next, save a copy of the html for your main tumblr page. You can use wget which will result in an index.html file or you can right-click on your page, select "view source" and then select all, copy, and then paste that into a text editor. If the preferred backup fails for whatever reason, this one can be used as an alternative.
Now, to fix the problem.
First, open the Tumblr html editor and left-click anywhere in the html code and then press CTRL+F to use the "Search For" and "Replace With" feature.
Search for: http:// and replace with: https:// and then click on All to replace all.
Search for: "// and replace with: "https:// and then click on All to replace all.
Search for: android-app:// and replace with: android-app:https:// and then click on All to replace all.
Search for: ios-app:// and replace with: ios-app:https:// and then click on All to replace all.
Search for: http-equiv and replace with: https-equiv and then click on All to replace all.
Finally, click on Update Preview to verify your changes. If everything looks good and your page displays fine, click Save.
As mentioned by others, the CSS fields are most important. If you are still getting an error, Search For css and click through the results while inspecting the code that follows under each CSS section to make sure all links are https. This is how I discovered "//
However it should be noted that, at least for me, the code did update despite the error. Even when I got an error, I noticed that the changes were applied and remained after closing and reopening the html editor.

Related

Duplicate html tags ruin parts of WP site

I'm at a loss with this error, on some parts of my WP site I'm getting duplicate html tags added automatically on saving changes.
On visual editing, after publishing I get these added to my post:
&lt;br /&gt; &lt;br /&gt;
Since it's visual, I can see these tags all over my newly published pages, meaning I have to go back and manually remove these lines and update the post so it looks as intended.
On some plugins I can't add multimedia content because they are automatically replaced by br tags. Doesn't matter if I add media in text or visual, upon updating they automatically disappear.
But the most infuriating is that I can't log out anymore, because the logout URL should look like this:
http://example.com/wp-login.php?action=logout&_wpnonce=...
But instead it looks like this:
http://example.com/wp-login.php?action=logout&_wpnonce=...
So "&" becomes "& amp;" which breakes logout.
What I've tried:
Disabling all plugins, resetting plugins folder, deleting all unused plugins, switching back to base theme, disabling global java scripts (I have popups on the site which needs it).
I can't exactly tell when did it go wrong, it could have been a WP-update or something like that but I can't trace back the error and it doesn't seem like any other users experience the problem.
I managed to solve it, it was quite easy.
I needed to edit wp-config.php and disable custom_tags:
define('CUSTOM_TAGS', false );
I do not know what set it to true, maybe it was a plugin I briefly installed and then deleted, but it messed up the site quite badly.
Every problem I mentioned above got solved immediately once I set it to false.

Redirecting Posts on Tumblr to Custom Pages

Now before you post one of the many "Add a Page" tutorials I've read, I'm going to say that none of those have helped because not only has Tumblr removed the "Redirect" option on it (courtesy of April 8th, 2015, unfortunately), but the add a page feature does not seem to work when using a custom HTML code--even when you use the "add a page" link that you created and paste it into the link url section provided for the tabs!
Of course, I have also looked at questions on here, but those pertain to loops leading back to the Home page, and do not specify how to have your posts redirected to a specific page. Believe me, I have tried the whole /tagged/yourname URLS under the URL section for the Link, but that is ineffective. I have even tried giving the post a Custom URL and then pasting that URL into the designated link URL section to see if it would pop up under the page but alas, that did not work either. And yes, I've even scoured through the code to find a possible paste solution and have pasted the link into the code directly, but that didn't change anything either as it was just under the "naming" section in the beginning of the code, anyways (should've known that wouldn't work).
If anyone can help me with this issue, or at least understand what I'm even asking, I would be forever grateful.
EFFORT FURTHER EXPLAINED:
Note: the tumblr's /submit URL works, but my attempts on, for eg, a separate art page for posts tagged "somethingart" have been fails.
Redirect: Here's an example of one of the many tutorials I read that has a clear image of where the "redirect" option should be, but of course it's outdated as the edit appearance looks slightly different from that now (you have to scroll down a little).
Okay, so let's move on to the other attempts now although, unfortunately, you're going to have to view them on a google document because apparently, you need to have 10+ reputation to post more than two links (click the link above)!
As for the coding part, well I'm actually a beginner at coding as I've only had two classes last semester (which was a while ago), and that was in C# and the foundations of computer science, so scouring through this code to try and find where I could add something to make it work only gave me a headache in the end (it's really long...).
I think I get you now. As a new account some features are not yet available to you. You will get those features eventually. For now (from what you have in the pictures):
The link (link6 URL) went to home page (or to the error page) most probably because you did not have http:// in the beginning. I said that by assuming how your theme is made based on the picture of 'Theme Options'.
After that is solved, you know the page would not redirect itself to your "tagged/something" page because it is not a "Redirect" page, and you do not have any script to do the redirection (if you do not actually).
Do not worry though, there is a better way; just have the "tagged/something" link directly in your "Link6 URL" option (as in the pictures). You have to put it something like; http://yourblog.tumblr.com/tagged/something.
Let me know if you have any questions?

How do I Prevent Httrack From Downloading the Same File Again?

I am using httrack to download this website:
http://4minutearticles.com/
However, the problem is that the author has link back to the main page on every page of his website
For example http://4minutearticles.com/ext/
The Parent Directory Link Redirect to the main page
and the software start downloading again
How do I prevent this loop from happening?
Read the answer to the question on the link provided below:
"I have duplicate files!What's going on?"
Link: http://www.httrack.com/html/faq.html#Q1b11
Also have a look at the "Filters:Advanced" on following link:
http://www.httrack.com/html/filters.html
It may help you on your issue.
You can use filters to stop HTTRACK from downloading same files or folders. You can do this by clicking the "Set options" button in front of the "Preferences and Mirror options" label, then opening the "Scan Rules" tab and then the "Exclude links" button to set the rules as you want.
This is generally the case for top indexes (index.html and
index-2.html).
This is a common issue, but that can not be easily avoided!
For example, http://www.foobar.com/ and
http://www.foobar.com/index.html might be the same pages. But if links
in the website refers both to http://www.foobar.com/ and
http://www.foobar.com/index.html, these two pages will be caught. And
because http://www.foobar.com/ must have a name, as you may want to
browse the website locally (the / would give a directory listing, NOT
the index itself!), HTTrack must find one. Therefore, two index.html
will be produced, one with the -2 to show that the file had to be
renamed.
It might be a good idea to consider that http://www.foobar.com/ and
http://www.foobar.com/index.html are the same links, to avoid
duplicate files, isn't it? NO, because the top index (/) can refer to
ANY filename, and if index.html is generally the default name,
index.htm can be choosen, or index.php3, mydog.jpg, or anything you
may imagine. (some webmasters are really crazy)
Note: In some rare cases, duplicate data files can be found when the
website redirect to another file. This issue should be rare, and might
be avoided using filters.
See also: Updating a project

Is it possible to save changes in Firebug locally?

What I'm trying to do is to save the changes I make to CSS and HTML on different sites with Firebug.
Just to be clear, I don't expect Firebug to upload the changes to the server via FTP or anything. I just want to save the changes locally, so only I will be able to see them.
For example I've seen a few Firefox/Chrome extensions that add a download button under every video on Youtube, so I know it's possible to do that somehow.
If you have a different way to achieve what I'm trying to do, I'll be glad to hear about it.
(It doesn't have to be with Firebug.)
Thanks in advance!
If you don't mind using Web Developer Toolbar it's easy to save changes made to the DOM (and CSS).
When you install the toolbar, you'll get a "View Source" menu, click on that and choose "View generated source". Then just copy and paste that into a .html file.
You did not say if you alter your HTML or CSS, if CSS, FireFile is a very good addon for this.
Edit, with some Googling, i found FireDiff, which states that it can export changes made in Firebug, i have not tested it bit it's worth checking out.
You could try using Greasemonkey.
It has support for adding custom scripts that are run whenever you load a page (linked to which pages it should load on) and that can make changes to the page dynamically.
https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/
The http://chrispederick.com/work/web-developer/ web developer toolbar will let you add a user style sheet to a site which should achieve your goals.
This may or may not be exactly what you're asking for, but you can download the extension FireDiff in order to save changes made with FireBug. I made a little tutorial on how to do it here: https://www.youtube.com/watch?v=m4OmZLX2zd4
I have a somewhat simlar use-case that I solved differently. I'm not sure if it is what you are looking for or not. I'll describe the behavior and if that is helpful I'll explain exactly how I implemented it.
I changed the code that execute when you click "Run" (or Ctrl+Enter) to check to see if the first line of the code is a hard-coded string //LoadFromFile:<file path>. If it is, and the file exists then I pull the file off of the local file system and run it instead of executing the code in the console window. This way I can use an external text editor to write code.

How to link a relative html file in the scenario where user can call the files from the browser by adding a / at the end

(Sorry I am not able to frame question correctly.)
Following is the scenario.
I have 2 Html files.
File1.Html has
Click Me
File2.Html has
Click Me
Now when I open the file1.html in browser by typing following in browser.
http://Localhost/File1.html
The file1.html with a link is shown and when clicked it goes to
http://Localhost/File2.html
BUT
If I open the file1.html in browser by typing following in browser(note the / at the end).
http://Localhost/File1.html/
The file1.html with a link is shown and when clicked it goes to
http://Localhost/File1.html/File2.html
I know this is not a right way to do in browser but you cant stop user doing so.
The above example I have used just to simplify the issue. My real production issue issue is while using the MVC url are actually routed. So a user can legally use http://example.com/Employee Or http://example.com/Employee/ and due to this my jqGrid is not working.
Please guide me for a workaround.
UPDATE:
This works ok in IExplorer : wierd.
You want a link relative to the root. The following:
Click Me
(note the '/' at the start of the href) will link to http://Localhost/File1.html wherever the page containing the link is (so long as it's on the same host).
not relative to root i need it relative to parent
That's not possible. If you are using routed URIs there can be all sorts of /path/segments following the base name. The browser has no way of knowing what the real ‘parent’ is.
The usual solution is to use root-relative URIs as suggested by Joe. If you need to allow your application to be mounted at a configurable prefix under the root, that prefix will need to be copied out into the link.
Your question reminds me of a technique for search friendly URLs, implemented in PHP.
Things like:
http://localhost/index.php/2009/09/
It was described on Sitepoint.com The idea was that index.php could retrieve the trailing part of the URL from the web server and decide what to do with it. Including whether to deal with a final / or not.
It won't be relevant to html files (which could not, after all, retrieve the trailing part of a URL) but it might provide further ideas.