WordPress timeout error ('Articles' admin link + WPML) - javascript

In my WordPress admin when I am inside a single article in the admin panel, and I click on the 'Articles' link on the left menu, I get my a timeout in my browser. This is very strange, because it happens ONLY when I click on that link inside an article: it doesn't happen when I click it from other sections of the panel, as when I'm in the dashboard or plugins section and I want to go to articles.
The second error I receive is when I click the 'Duplicate' button inside a post to translate that content in another language. The result is the same, 5 minutes loading and timeout error which leads to crash of the browser.
All plugins are updated, as well as the WordPress version. I have already tried to disable and activate each plugin one by one and this error comes anyway, also with all plugins disabled!!
I think it's not about WordPress version or plugins but it's like there's something which the system can't manage loading inside the article...I really can't figure out any solution.

Related

jQuery Lazy not loading images after I click the Facebook Connect button

I implemented jQuery Lazy: http://jquery.eisbehr.de/lazy/. Everything works correctly except for one thing: When I click the Facebook Connect button, the images remain blank. After I click around, they come in as usual.
I have noticed that when I click the Facebook Connect button to log in, the URL in the address bar changes from [My URL] to [My URL]/#_=_. The Facebook Connect implementation does something that prevents the jQuery Lazy images to load unless I click around after this Facebook login. I have not found online anybody complaining about this. I thought it would be a common and addressed bug. Any ideas about why this could be happening?
UPDATE 1: When I visit [My URL]/#_=_ without using Facebook Connect at all, jQuery Lazy does not work either, the images remain blank. What happens is that when I click around, this #_=_ that is appended immediately after I log in with Facebook, gets removed. What I am seeing is that the problem is this #_=_ that Facebook Connect puts at the end of our URL. I see this situation is discussed at Facebook Callback appends '#_=_' to Return URL and the logical thing to do would be to get rid of the #_=_ but not without studying first the implications of doing that.
UPDATE 2: I followed Gorgi Rankovski's comment to Ryan's solution at Facebook Callback appends '#_=_' to Return URL and used this in my head tag:
<script type="text/javascript"> var idx=window.location.toString().indexOf("#_=_"); if (idx>0) { window.location = window.location.toString().substring(0, idx); } </script>
Now [My URL]/#_=_ becomes [My URL]/, which is what I wanted. Nonetheless, this did not fix the problem about the jQuery Lazy images not loading after clicking the Facebook Connect button.
UPDATE 3: I tried https://appelsiini.net/projects/lazyload/ instead of http://jquery.eisbehr.de/lazy/ for lazy loading images, two different plugins for lazy loading images, and both of them experience the same bug when using Facebook Connect.
I experienced a similar bug using Slick carousel (Pictures of Slick carousel do now show only after coming back from a successful Facebook Connect). I guess upgrading the Facebook PHP SDK (v.3.2.3) to something newer might help. For now I am not using jQuery Lazy anymore after not finding a fix for this bug yet.

Slidemenu won't load the first time in JQuery Mobile App

I have a Jquery Mobile app with a slidemenu in the global page, and it appears with the press of a button or a swipe on the screen, facebook style. My problem is that the first time the app loads, the menu never pops out, even if you press the button a thousand times. You have to refresh the page and then in works in all the pages of the app for the lifetime of the session. If you logout and enter again, you need to refresh.
You can see a example here: http://cic-team.no-ip.biz:9090/apex/f?p=112:2 User: Demo Passw: 1234abc
The menu it's in an "After Header" region as a "List: Menu" type with this custom template: http://i236.photobucket.com/albums/ff289/Best1989/template.png
The button has the following attributes:
data-slidemenu="#slidemenu" data-slideopen="false" style="margin-left:0px !important;"
Maybe the Javascript or the CSS are not loading correctly the first time, but inserting the menu in other region has not worked for me. I'll gladly read your suggestions and comments.
I'm using Apex 4.2.0.
Thanks in advance.
With some research I found the answer to my question, please check this:
http://www.gajotres.net/how-jquery-mobile-page-handling-affects-javascript-executions/
The problem was that I wasn't loading the menu classes at the Login page (which is the first of all) and when you actually got to the page where the button and menu is displayed, it didn't load the classes.
Solved the problem loading the components in the first page but keeping them hidden.

Will Firefox start my SDK extension automatically after the browser starts - loading screen

I am new on add-on development using the SDK.
I want to ask you guys if it is possible to start my extension automatically after I open my browser? At the moment I starts after I press my widget icon in the toolbar (the panel shows a table with some data I get from the DOM).
Another thing I want to ask you: is it possible to show a loading screen (like a ajax gif) inside my panel (my extension needs a few seconds after switching a tab, to get the DOM data) every time I press the toolbar button.
First of all: One question per post, please.
Extensions are always started with the browser. When it comes to SDK add-ons, your main.js will be called. It's your job to perform any additional initialization form there.
Panels contain regular HTML pages and therefore can use images.
It's impossible to tell you more, without you providing more details and the code you got so far!

Dynamically add Like Buttons to a page

I'm building a page that is aggregating other pages in a Wordpress site, and displaying snippets of information about them along with a 'Like' button. Right now I'm using the iFrame option.
What happens is when a user clicks on a video, it displays it in a Feature area with the video, some text, and a Like button. This HTML is generated from a template and created after a user clicks on a video to watch it. There isn't a page refresh.
If I use the HTML5 version of the Like button, it never gets rendered, which I'm guessing is because the Like div never exists when the Facebook init is called. I'd like to not use the iFrame version though, because it doesn't seem to let me allow people to comment on their like.
Is there a way to have Facebook re-scan for elements to render? I know that Twitter will allow you to do this by running twttr.widgets.load() at any time to have it rescan for things to render.
Just call this function after loading the dynamic site, i am pretty sure it´s what you need:
https://developers.facebook.com/docs/reference/javascript/FB.XFBML.parse/

Facebook Like And Twitter Tweet Load Slow

I have put a facebook like, facebook send, and twitter tweet button 10 times on my web page (1 for each article in my thread), but yet the page loads very slowly. Right now the site is just running on my local XAMPP stack but when I comment out those widgets, the page loads instantaneously. Otherwise it takes like 10 seconds to load.
It would be helpful to see the code to make sure you are applying it correctly, but I've experienced similar symptoms before. The way I would render it is by having the associated external Javascript files just before your </body> tag and not in your head. If the connection to the external host is slow, it can cause parallisation issues so you want to load it last.
This is happening all over the web lately. I'll see a slow-loading page and sure enough at the bottom there's a note that facebook or twitter is still loading.
The solution I found was an extension that shows the FB, Twitter buttons but doesn't actually load them unless you click the button. That way your page loads quickly and if FB or Twitter is slow that's their problem.
I use Sharrre for social sharing buttons. I activate it on mouseover so nothing is loaded until the user actually needs it. Hard to get it faster than this. It also supports a few other networks.
I don't load social sharing buttons directly anymore and only do it when there is no other option. Those things are horrible for loading times specially if used multiple times on the same page.

Categories