polylang plugin shows all site pages on one page when switching to second language - polylang

I am trying to switch to a second language using polylang plugin in my Wordpress test site.
I don't have relevant code to show, I haven't identified problem code associated with this error.
What I expect is to find myself on the Home page equivalent in the second language no matter which English page I was on previously.
Instead I am taken to the Spanish version of the About page, not Home page equivalent. Also, the page content is made up of not just that page's content but all of the content from every page on the site is stacked on top of each other - including old versions of pages.
If I subsequently click on the Spanish menu which displays as expected, the next page displays perfectly. When I click back to the About page (the page previous acting as a site catch-all) everything is as it should be. So the problem only manifests on the initial switch to a second language.
Switching back to English does not cause the problem to reoccur, everything is fine in this case. It is only when initially switching from English (site primary language) to Spanish that the problem occurs.
I am using the 'X' Wordpress theme for this 'local' version of my site. My Wordpress & free polylang versions are up to date.
Any help with this problem would be much appreciated.
Thanks, Brent.

I have come up with a solution for my problem.
This isn't the most elegant solution but I need something that works now so here goes.
I noticed that when switching to Spanish I was taken to the page: http://localhost/www.ecia.com/es/ i.e. no specific page, fine if I had an index.php file in that location but I don't. The result is I am taken to the page with the bloated content.
My work around was, use a redirection for that URL to the page I want the switcher to go to i.e. instead of http://localhost/www.ecia.com/es - I redirect to http://localhost/www.ecia.com/es/casa
This is not the best fix, but I have found it difficult going any deeper into how Polylang plugin works so it will suffice for my purposes.
Brent

I have solved this by:
Go to language/setting/url settigs
Uncheck "Hide URL language information for default language "

Related

tx_news: Detail view always renders the article first viewed

T3 8.7.15 with latest versions of tx_news and realurl. All was running just fine. Out of a sudden the following happens:
Click the link of a news article from a list view and it renders the detail view and displays everything correctly, as expected. When I then go back and click (any) another article it will again display the article I just view previously and will only display this article anymore, no matter which other I article I choose. It is always the first article rendered that is being displayed (until cache is emptied).
The links are correct according to the article chosen, by the way. However always the first viewed article is displayed, no matter what.
Have deactivated realurl but behavior is same. Clearing all caches did not help either.
Related to news and realurl there is a special page in the manual of news: RealURL configuration, the advanced configuration includes also some settings related to chache.
Additional you might have to adjust some general cache-setting.
Another point is that you've to clean the cache of realurl perhaps after having adjusted some settings.
Furthermore there have been some changes related to cache in core and viewhelpers too, I'm just not sure if they apply to news in general or to your individual new-templates:
Remove option cHashIncludePageId from cHash calculation
Make cHash configurable in Fluid Widget Links
Concerning this issue you've to verify your templates if they use any applying viewhelper.
If all hints never help to remove the undesired caching-behavior the simplest workaround is to disable the cache on the news-pages completely till a solution is found. I will update this answer if I find further information. Here is how to disable the page cache for a single page:
Open the page-settings of the page(s) where the news-plugin is resided
Navigate to the tab "Behavior"
Adjust the cache-settings

wrong content is cached

We have a site which sometimes delivers a wrong content for a specific URL.
The page has a plugin and by default should show the records listing (or the first record listing as the listing is grouped by initial letter). After clicking a link some records are viewable in detail on the same page.
Every now and then a cache problem occurs:
Instead of the listing a detailed record is shown.
Although we use realurl, all problems occur also with the basic urls.
For overview I will only write the url-parameters, assume www.domain.tld/index.php? in front.
The page to call is id=61.
What I see is
cHash=3df3421afc42d3d5bfa1bc50603ea00d&id=61&tx_citkoegovservicelight_ansprechpartner%5Baction%5D=show&tx_citkoegovservicelight_ansprechpartner%5Bansprechpartner%5D=282.
In the HTML-source of the page I show the page calling parameters with the extension page_params. Here I see:
tx_citkoegovservicelight_ansprechpartner[action]=show&tx_citkoegovservicelight_ansprechpartner[ansprechpartner]=282&tx_citkoegovservicelight_ansprechpartner[letter]=kontakt&id=61
Two strange notes: there is no cHash parameter, there is an additional parameter tx_citkoegovservicelight_ansprechpartner[letter] which never should be used with detail view and never should have the value kontakt (only single characters were used for the listing of all records starting with that letter = no detail view)
Using these parameters does not show the detail-view but the the list view (for letter 'A').
I do not find a reason why this special URL should be called (no link) and I don't know why TYPO3 should cache a content which belongs to another URL.
And it is a problem with TYPO3 cache as all works correct if I clear the cache of this single page.
Please check my answer to another issue. The accepted answer is right in that case, but in your case it can really be caused by failed cHash calculation, because it is not related to RealURL.
Try to clear the cache and then right after that go to tx_citkoegovservicelight_ansprechpartner[action]=show&tx_citkoegovservicelight_ansprechpartner[ansprechpartner]=282&tx_citkoegovservicelight_ansprechpartner[letter]=kontakt&id=61.
And then simply open the page id=61. If you see the wrong cached result, then the reason is in a combination of following factors:
Plugin's action is cached
Cache fails are allowed in installation
cHash calculation failed
To prevent this you should enable pageNotFoundOnCHashError in Install Tool. Then the problematic link above will just trigger 404 and will not force TYPO3 to render the page.
To a question where the link is coming from. If the website is already live, it can be everything: from a crawler, which somehow builded the link itself to a user who tried to play with parameters.

Joomla 3.6.4 home page does not use correct robots meta data

Whilst in development on a temporary subdomain I had robots set to No Index, No Follow in the Joomla 3.6.4 Global Configuration.
After moving the site to its permanent home I changed the settings to Index, Follow but, all the pages are fine, except the home page, which is still showing (when source is viewed) meta name="robots" content="noindex, nofollow"
I have changed the menu item to 'Index, Follow' rather than 'use global' and, when that made no difference, also did the same for the single article which is assigned to that page. Still no change. It doesn't change on the original development site version, either.
This is a template that I have used many times before: I keep a basic copy with some global tweaks that I have made and then adapt it for each new site. I can change the robots meta tags on this original template with no problem.
I have no SEF plugins. The only SEF tool is the System - SEF.
I have checked all the template files over and over and I am now about to tear my hair out.
Any suggestions gratefully received.
(p.s. can someone with a better reputation than me please add a Joomla3.6.4 forum tag?)

Trigger a click on a page in the pagetree in Backend

How could I trigger in JS a click on the pageitem of TYPO3 BE pagetree by an ID of the page ?
Looking for solutions for versions 4.5 and 6.1.
The basics are described in this document (might be slightly deprecated):
http://buzz.typo3.org/people/steffen-kamper/article/backend-navigation-in-typo3-45/
For example, to open the submodule "task center" in the "user tools" module, enter this
top.TYPO3.ModuleMenu.App.showModule('user_task');
or, to change to the pagetree, this
top.TYPO3.ModuleMenu.App.showModule('web_layout');
inside the firebug console. According to the author,
The pagetree resides in top.TYPO3.Backend.NavigationContainer, the
content resides in top.TYPO3.Backend.ContentContainer.
I haven't really understood what you'd like to click on exactly. But it might get you started.
I think in real life (or in an html fragment in a page in the backend) you can set <a javascript:...> urls</a>
I am still trying to figure out the fine points of this javascript myself. I for one want to also click on a select-box in the content Iframe after clicking in the Admintools/Report submodule. The first part is this:
top.TYPO3.ModuleMenu.App.showModule('tools_txreportsM1');

SilverStripe CMS times-out when changing pages in the CMS

I have installed SilverStripe on several servers successfully in the past (but I'm not a SilverStripe expert). This time my SS install fails to work and I'm at a loss how to fix it.
The Problem
SilverStripe 2.4.6 installed correctly on the server (AFAIK).
The front-end works as expected. (Show default theme. Pages all load correctly.)
I am able to log into the CMS admin section succesfully. The CMS loads but when changing site pages in the CMS using the browser pane on the left, the CMS shows the circular loading symbol. The new page load never completes.
Using the console of Firebug in Firefox - When attempting to change pages in the CMS (by clicking on the page browser pane) the CMS tries to load two pages. The second page request 404s.
The first GET request is from the initial page loads.
The following POST+GET requests fire when clicking on the page tree to change pages.
Attempting to Find the Solution
I've tried deleting and re-installing silverstripe twice. (2.4.7 and 2.4.6) Both times the problem recurs.
A strange thing is that this server is already running two other silverstripe sites (both of which I installed without a hitch). All three websites are accessed via different domains. I tried accessing this install via another domain thinking there might be something wrong with how this third domain is configured but that didn't help either.
What should I try now? I'm stumped.
Thanks in advance.
Responses to Comments
Check your root .htaccess file. Make sure RewriteBase is set to /
Checked. Full .htaccess on PasteBin
Indeed the javascrip URL is strange. Check if there is anything unusual about what's being returned from the previous POST request. Is the site running in dev, test or live mode?
I can't see anything unusual in the POST request.
Clue Found: The site is running in DEV mode. Switching to LIVE mode and the problem disappears. Also the second GET request only shows up in DEV mode.
Example Post request with response.
Example Get request with respones.
This is a work around more than a fix but if you'd rather be coding than bug hunting it might be worth a go! (remember to log out of SS before doing this fix)
In your mysite/_config.php file change
Director::set_environment_type("dev");
to
if(!isset($_GET['isDev']))
Director::set_environment_type("dev");
else
Director::set_environment_type("live");
Then you can develop the website in dev mode normally and to use the admin in live mode and avoid the bug you just go to: http://{your_domain}/admin?isDev=0
N.B. might find a proper answer when pastebin.com isn't overloaded and I can see your responses!