Comments (6)
Hi Spheerys,
I'll need a lot more info than that to help out out.
1.- What do you mean by: « it doesn't work »? Provide me with softwares versions, steps to reproduce, what you expect, what happens instead.
2.- Is the static content of the page loading at all?
3.- What happens when you try with a single basic call such as
[[sitemapFriend]]
or
[[sitemapFriend? &type=
xml]]
from sitemapfriend.
OK.
I'm using MODX 2.2.7 with sitemapFriend 1.0.2
I'm confronted to the problem on this webpage : http://dev.jldenois.com/error404
The code I used to do this is :
<div class="span4">
<p>Plan du site Français</p>
[[sitemapFriend? &startId=`50`]]
</div>
<div class="span4">
<p>Sitemap in English</p>
[[sitemapFriend? &startId=`96`]]
</div>
..where the startId are the parent of each language.
As you can see, the generated sitemaps are the same, despite the differents startId.
If I try to make uncached call, the generated sitemaps switch to english. But I can't have the right two sitemap : french AND english.
Strange isn't it ?
from sitemapfriend.
Thanks for the details, I was able to reproduce the issue.
There's an odd behavior from Modx when calling $modx->getservice() multiple times on a single resource from within a snippet. It's unclear wether the bug originates from sitemapFriend or Modx. I'll need to investigate this further with the core team. It will take some time.
In the meantime and in your specific case, you could generate one 404 page for each language.
Since this organization would preserve the website's url scheme, it will be more consistent than having a single multi-language 404 page. It also scales better (think "more languages") and shrink better (think "independent languages", ie. less maintenance). Finally this might be an acceptable workaround until the issue is resolved.
Updates on the topic will be posted here.
from sitemapfriend.
Thanks for the analyse.
About the 2 error pages, one for each language : yes it should be the best idea, but I though MODx can only setup ONE error page (or maybe one per context, but I don't want to use context to manage bilinguism).
Anyway... I will wait for an issue, and for now I will keep only one french error page. It's best than no error page... :)
from sitemapfriend.
Another way to handle it is to serve a localized 404 page via a snippet that would look for the language string in the referer to set the startId and fall back to the browser locale in case the referer isn't set. If both fail, fallback to French.
from sitemapfriend.
Multiple calls can now be done on the same page (tested in modx 2.2.12-pl traditional). The issue was lying within modx.
from sitemapfriend.
Related Issues (10)
- titleField vs fieldTitle HOT 4
- Property for exclusion of resources class modWebLink HOT 1
- Sitemap empty HOT 3
- page do not validate as sitemap in google webmaster tools HOT 9
- Unable to install sitemapfriend HOT 2
- Displays only top level documents, unless specified in includeResources HOT 4
- li style HOT 1
- Exclude error pages in contexts HOT 1
- onlyTemplates does not work for children HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sitemapfriend.