Tag Archives: Browser

Causes and solutions of WordPress media library pictures not showing or showing errors

Recently, I am developing a WordPress Theme – wait theme, but in the process of development, a wonderful problem suddenly appears, the media library pictures are not displayed!! Always show the small circle in loading, and upload images always fail. After struggling for two or three days, I finally found out the problem and quickly wrote it down….

describe

Recently, I am developing a WordPress Theme – wait theme, but in the process of development, a wonderful problem suddenly appears, the media library pictures are not displayed!! Always show the small circle in loading, and upload images always fail. The details are shown in the figure below:

The selection list mode is normal

attempt

After finding this problem, the other work of theme development can only be temporarily stopped and focused on solving this problem.

First go to the Internet search, the results found that the results are the same, what folder permissions, file coding problems, plug-in settings and so on.

However, this is a local test system. No plug-ins are installed and there is no permission problem. The coding format is utf8 without BOM.

It is found that a few netizens have the same problem as me, but no one below gives a solution…..

After the search on the Internet is fruitless, we can only find a solution by ourselves.

explore

First of all, I suspect that my topic function has the same name as the function of WP. So open it upload.php , compare the functions one by one with the functions written by yourself, and find that there is no duplicate name problem, so this option is excluded.

Then check the admin file, no suspicious situation is found.

In the browser debugging window, check the loading and debugging of CSS and JS, and no exception is found.

Finally, there is no way to open the code window, line by line to view the code, also did not find anything suspicious.

It took me two or three days to go back and forth in this way. Until this afternoon, I found the root of the problem~~~~

problem

When looking at the code again this afternoon, I suddenly found such a statement:

The problem lies in this sentence!!!!

Look at the explanation of HTML Declaration on w3school

≪! DOCTYPE & gt; declaration must be the first line of an HTML document, before the & lt; HTML & gt; tag.

≪! DOCTYPE & gt; declaration is not an HTML tag; it is an instruction to the web browser about which HTML version the page is written with.

In HTML 4.01, the & lt;! DOCTYPE & gt; declaration references DTD because HTML 4.01 is based on SGML. DTD specifies the rules of markup language, so that the browser can present the content correctly.

HTML5 is not based on SGML, so there is no need to reference DTD.

Tip: always add a & lt;! DOCTYPE & gt; declaration to an HTML document so that the browser knows the document type.

≪! DOCTYPE & gt; declaration must be the first line of an HTML document, before the & lt; HTML & gt; tag! ≪! DOCTYPE & gt; declaration must be the first line of an HTML document, before the & lt; HTML & gt; tag! ≪! DOCTYPE & gt; declaration must be the first line of an HTML document, before the & lt; HTML & gt; tag!

Three important words~~

Therefore, as long as the above obnoxious sentence is removed, this problem can be solved ~ ~
by removing it

solve

Looking for the source code, I found that there was a reference in my admin file:

At that time, I thought that this sentence would be in the main body of the web page, so I wrote it. But today, I found that no matter where I put it, it will always appear in the first line of the web page!!! WTF!!!

Only by deleting it and writing the CSS code to the file, can the problem be solved successfully~~~~

summary

1. Don’t blindly believe in things on the Internet, do it yourself is the king

2. Debugging a bug starts with the source code.

3. When it comes to problems, be calm and don’t be impatient~~

4. Do it yourself~~~

prospect

Wait theme will be released soon, please look forward to it~~~

Reprint English blogs with source

Reprint English blogs with source

Reprint English blogs with source

Three important words~~


Welcome to my website:

Other English Blogs

++>

Causes and solutions of WordPress media library pictures not showing or showing errors

A little bug of CSDN blog

Recently, when editing the blog, I found a small flaw in CSDN, which should not be a bug, but if I don’t pay attention, it may also bring a lot of trouble to users.

Hyperlinks are sometimes used when editing blogs. When adding hyperlinks, the interface of CSDN is as follows:

Users can enter their own link address in the link address column, but please note that the “http://” field is selected by default, that is, if you copy a link address and want to paste it into this column, you will erase the “http://” field, leaving only your own pasted address.

And in practice, the probability is very high.

What’s the difference between HTTP and no HTTP?

From the perspective of users, they don’t want to make a difference, but in practice, there is a big difference between HTTP and no http.

There is no HTTP at the beginning. The browser will treat the link as a relative address by default, that is, the address relative to the current address“ blog.csdn.net/waitig1992/article/details/ ”Add the address you entered after this address.

But most users don’t want this result. They just want the browser to jump to the link they input, which leads to the lack of user experience.

Some people will say: those who publish articles on CSDN are all technical giants. They should know these problems and can avoid them by themselves. They can modify them by themselves.

But all things can’t be solved by users themselves. Moreover, with the fierce competition, some small details may determine the success or failure of the enterprise.

And not everyone has noticed.

On the contrary, baidu space noticed this detail, its hyperlink input box does not have “http://”, but automatically detects changes after users edit. As shown in the figure:

After editing, it will automatically detect and modify, and add “http://”, as shown in the figure:

In this way, users don’t have to care whether they write “http://”, but can focus more on their own articles.

That’s the details.

Appendix:

This link has “http://” blog.csdn.net/waitig1992

There is no http:// blog.csdn.net/waitig1992

You can click to see the difference;

I hope CSDN official can pay attention to this problem, and I will also send email feedback.

Finally, I wish CSDN more and more fire, you can all think of it!

Chrome browser network error: err_ CERT_ AUTHORITY_ INVALID

Reprint please indicate the author (DuGuShangLiang dugushangliang) reference: https://blog.csdn.net/dugushangliang/article/details/85275319
 
NET::ERR_CERT_COMMON_NAME_INVALID, NET::ERR_CERT_AUTHORITY_INVALID, etc. NET::ERR_CERT_AUTHORITY_INVALID, etc.
Tries all the browsers on this machine: Chrome, Firefox, Internet Explorer, Microsoft Edge, by clicking: Advanced, continue to go to, can open, but in the open interface for some operations, display a variety of errors, can not achieve the expected results, Chrome F12 to view the network, as follows:

This problem has been torturing for a long time, I have repeatedly antivirus, repair system, uninstall and reinstall, and so on, still have this problem.
And finally, it dawned on me what the problem was.
As shown in the figure below, the interface I just opened is an overview. I want to view the data, so I click “Data” with the mouse, and an error occurs.

Error reporting occurs when a page jumps or when we click on a page widget, so we open the Developer Tools before the error occurs. Chrome can be opened directly by pressing F12. In this case, it opens when the page is just opened and the interface is an overview. Then we carry out page operation, such as clicking a button, in this case, clicking “Data” to switch to the data interface. At this time, an error will be reported. When we check the network, we find red information.

We select the red message to see the details. Under headers, we’ll find the request URL, and in that URL we’ll find a question mark “?” “, copied all the URLs in front of the question mark, such as: https://www.xxx.com/… /0, open another TAB and try to visit the URL by pasting it into the URL bar and going to

As shown in the following picture, the prompt from Chrome browser will prompt that the connection is not secure, so we choose to continue. Firefox will say “Added as an exception.”
above
 
That was the problem, and when the site was successfully opened, our problem was solved. The default setting is to deny access to this site because it has not been made an exception first, so you will get an error if you go directly to this site via the link.
I searched up and down, forget all about eating and sleeping, sweat and sweat, and was also an accidental opportunity (that is, accidentally opened the website, so was added exceptions, so later on normal) to solve, but did not know the problem at that time. Later, by chance, I figured it out and verified the situation, and added the reasons for reference. This is like Duan Yu mistakenly into Wulianshan Jian Lake Palace, obtained the same martial arts secret books. Tap-stamping iron shoes have no place to find, the original trouble me for a long time, is such a simple small problem.
If there are people who don’t understand this article, don’t criticize them. If there are any problems, let’s try to solve them. After all, there are multiple possible causes of the same or similar symptoms. If you’re here to find fault, don’t bother to add a comment.)
(September 26, 2019, and the other an open, discusses related development solution: https://blog.csdn.net/dugushangliang/article/details/101421339).
 
Solitary and good Dugushangliang

Solve the browser err_proxy_connection_failed problem

Err_proxy_connection_failed appears using the browser as shown in the figure below:
Solution:
1. Enter setting -& GT; Click Show Advanced Settings:

2. Click to change the proxy server Settings:

3. Display Internet properties and click LAN Settings

4. Click the proxy server for LAN (√) and you’re done

ssh port forwarding

Haihan Zhou July 2, 2010

Goddady’s Linux virtual host is used to provide SSH. However, when using SSH-D port XXX @server, I encountered the following error of SSH printing:

channel 3: open failed: administratively prohibited: open failed

When the Firefox browser is configured with SOCKS5 pointing to a local port, browsing any web page appears blank.
What is the reason for this?
SSH, open sSHd_config and have a look.

cat /etc/ssh/sshd_config

There was a row:

AllowTcpForwarding no

The original host set the TCP port forwarding for SSH to be disabled. That wants to use SSH as agent to carry out port forwarding is certainly unsuccessful.
Look at the system configuration again, also prohibit IP forwarding;

cat /etc/sysctl.conf | grep ip_forward
net.ipv4.ip_forward = 0

Therefore, the virtual host prompt port forwarding is prohibited, normal.

System and host port mapping under virtualbox

Environment:
Virtualbox is installed under Ubuntu and XP is installed under VirtualBox,
 
Requirements:
Accessing xp Web services under Ubuntu,
 
Methods:
To do port mapping in Ubuntu, execute the following command (turn the virtual off before executing) :
VBoxManage setextradata “xp” “VBoxInternal/Devices/pcnet/0/LUN# 0/Config/web/Protocol” TCP
VBoxManage setextradata “xp” “VBoxInternal/Devices/pcnet/0/LUN# 0/Config/web/GuestPort” 80
VBoxManage setextradata “xp” “VBoxInternal/Devices/pcnet/0/LUN# 0/Config/web/HostPort” 8888
 
The operating system name of the “XP” virtual machine; Pcnet is a network type; The Web can be anything;
 
Completed: start the xp virtual machine, and then under the ubuntu browser to access the address is: http://www.test.com:8888/, 80 service will show the xp system.
 
Just to remind you, there’s one question that’s been bothering me for a long time:
Description:

NAT#0: configuration query for “HostPort” int failed (VERR_CFGM_VALUE_NOT_FOUND).
Unknown error creating VM (VERR_CFGM_VALUE_NOT_FOUND).
 
When using VBoxManage setextradata “xp” “VBoxInternal/Devices/pcnet/0/LUN# 0/Config/web/HostPort”, 8080, the above problems;
Later: 8080 into 8888 port IS OK.