Wordpress session gets lost in Mozilla Firefox - php

I am working with wordpress template. I used my template page for crud functionality. It's working well but one page is creating problem of session. It looses the session in mozilla firefox. If I refresh that page or redirect to another page then the session automatically gets lost.. Can somebody help me wid a solution.. and why on earth is this happening??
P.S: That particular page is working perfectly in chrome,safari and IE i.e it doesnt loose the session.
Thanks!

this is the issue because of the Mozilla's Cache Management
Actually the thing is that wp create meta tag for next and prev. link and to make your performance batter Mozilla Preload Next post which might be the issue you are facing try below code that might help you to resolve the issue
remove_action('wp_head', 'adjacent_posts_rel_link_wp_head');
Add the above line in your functions.php file and this might solve your issue

Related

Wordpress comments.PHP shows cached version on incognito BUT new version for logged in admin

I've been bumping my head around this for quite a while now. I've added some code to the comments.php function which is loaded on some pages. That code, however, does not work on ALL pages in the incognito browser, but strangely enough, it works on some of them.
When I'm using admin users, it pretty much works on all of them.
What can the problem with this even be?? I've tried flushing cache, disabling it, nothing helps. I'm using Elementor as well if that helps.
If anyone has any idea, I would highly appreciate it, any help is welcome.
UPDATE:
Wordpress sorcery has no bounds. Okay, when I find that certain "post" where I want to see the changes and just click on "Update" button with NO REAL UPDATES DONE in that file, it works and shows up new code from comments.php. But come on, I have tons of those posts, do I really need to "Update" each of them? Is there a smarter way to do this?

Webpage styling not working after changes

I was making some changes on the header.php file of my wordpress site, related to the flag icons displayed on the top of the webpage.
After that, I loaded back the page and suddenly it all appeared messed. I undoed all the changes I've previosly done, saved and I don't know why but the page is still messed.
Just so you can see how it should be and how it's actually looking like.
I'm sort of desperate because of it, so any clue in what could be causing this is gonna be extremely helpful.
Thanks!
Sometimes with wordpress it needs a bit of time until it's changing. Also try pressing F5 to force refresh, or clear your cache.
Also, you might forgot to add some styles or other file.

Blank space at the bottom of page when using BACK with CHROME

Not sure how to ask this question properly.
If you go on the website I'm currently working on:
My Website
The page loads fine, but if you go to another page or link afterwards and then hit BACK, the same page loads with a huge blank space at the bottom. If you refresh the page, it fixes itself. The website pcgamer.com seems to have the same problem.
Here is my HTML/PHP and CSS:
Source Code
EDIT 1: Removing the facebook plugin seems to solve the problem, but how can I use the plugin without having this issue ?
disable facebook like plugin and check it will fix your problem
I just check your web and I think I got your problem. You set .bodymainwrap to has height of 2100px. Please delete the css height:2100px; at .bodymainwrap selector. I'm sure it'll work.

TinyMCE refresh issue

I'm using TinyMCE, witch is working fine for the most part... when the user saves the page redirects to a a php page that extracts the textfield data and processes it, i wont elaborate cause that's no t the issue... the issue is that when it redirects back to the page... the textfield is blank and i can click on it but not see anything, if i type it enters(but i can't see it), this also happens when i go to the address directly, the only way i can see it is to hit the refresh button... i tried a meta refresh to the page... i tried disabling cache... any ideas would be great... thanks in advance
I was getting this type of error in FF11.tinyMCE creates problem with some latest browsers version.To solve this problem try to get latest version of tinyMCE.

Lost sessionvariables in firefox

I have a pretty strage problem im dealing with.
Lost sessionvariables in firefox.
Im using wordpress and have a subpage that causes the loss.
More specific:
In wordpress there exists a page called My pages (Original page names are in swedish, translated for convinience)
Under this page i have a few subpages. Among these are a page called Create test. There is nothing special about this page, for now only contains the phrase "hello world". If I enter any page other that this, it works.
But this particular page just seems to clear my session variables (wich I use to store login info)
I tried deleting the page in question in the effort to remake it.
While it was deleted I tried navigating around on the page.
Create test was the last item in the subnavigation menu, and now when its gone, the same thing happens on the last menuitem (now Account settings). This leave me to believe its something with the menu.
Even more strange, after recreating Create test, so that this page is now the last item. Still it's Account settings that is the page with the resetting of sessionvars...
I have through echo determined that the session id stays the same, just the variables that get unset.
I have unset($_SESSION['id']); at only one place, and this code is NOT run.
The problem just baffles me and I have no idea why this particular pages does this.
It may be totally unrelated, but we had problem with Firefox and sessions on certain pages in the past. It happened most of the times while developing and therefore refreshing a particular page, have you tried clearing your browser cookies which is where session is stored?
As an addition:
Check that you assign sessions before you write anything to the response stream.
Also we had similar problems with sessions set in a pages that were doing a redirection (i.e. a login page that if successful would set the session and redirect to the another page.)
I'm not sure about PHP but in .NET that can be overcome by explicitly setting not to terminate the response so that all headers are written to the response stream.
Fixed now, actually have no idea what I did. but I've change some html but mostly CSS.
So there is a strong posibility it was CSS-related.

Categories