Jul 03, 2009, 10:48 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
Search via SMF or Google: modx forums all of modxcms.com web
  MODxCMS.com   Forums   Help Login Register  
Pages: 1 ... 10 11 [12] 13   Go Down
  Print  
Author Topic: Support/Comments for sitemap  (Read 50271 times)
0 Members and 1 Guest are viewing this topic.
markg
Sr. Member
****
Posts: 302


« Reply #165 on: Oct 01, 2008, 10:51 PM »

OK,

will answer my own question here.

Despite turning off TinyMCE for this document it kept putting in <p> tags everytime I saved it. (Those of you used to Tiny MCE will well know the problems it causes.)

Anyway, what I did as a work around was create a new template (called empty) and placed the call in there.

Then, in the document I just left it completely blank. Voila, I now have an unstyled xml file.

Logged
bmilton
Jr. Member
*
Posts: 30



WWW
« Reply #166 on: Oct 02, 2008, 05:11 PM »

Hi,

I think that this Sitemap tool is really useful, but I've discovered a problem.  It does not co-exist well with a site that is using the SEO Strict URL plug-in.  Since both tools are tailored towards SEO enthusiasts, I think it is likely that someone will try to use both on their site.

Here's the deal...The SEO Strict URL plugin is re-writing all of the URLs.  So for example on my site I like the look of base name only with no extension.

I prefer: http://seoconductor.com/about
and not: http://seoconductor.com/about.html

So, in my sitemap I want all of my important pages to be listed just as I am presenting them to the public (without the extension). 

The problem is that while I am presenting them without extension to the public, the Sitemap plug-in is unaware of the rewrite that is being done by the Strict URL plug-in.  The result is that it lists all of the documents in the sitemap with .html extension.  Then when googlebot looks at the sitemap it will find that every single URL in the sitemap is being is being 301 redirected and complain.

I found a temp workaround for this if you want to use Base Name and the Sitemap Snippet:
1.  Turn off the "Suffix for URLs" setting in Modx Config.  I.E. clear the ".html" setting.
2.  Configure your docs to use "Base Name" via the Strict URL plug-in.

This isn't ideal though, because you won't be able to utilize the SEO Strict Override TV to "append extension" for select documents.  What happens is it will have nothing to append since it takes this extension from the MODX "Suffix For URL" setting that we already cleared.  In this case I found another workaround...for the specific doc that you need to have the extension just change the doc alias such that it has .html at the end.

What I'd love to see is a way to make these two plug-ins more aware of each other. Over time I tend to forget all these workarounds I put in place.

Is there any way to code the sitemap snippet to check for the SEO Strict configuration before appending a doc to the sitemap?

Thanks,
-Brian


Logged

Brian Milton
Owner/Campaign Manager

SEO conductor
- We offer comprehensive SEO campaign management.
By orchestrating all aspects of your website, we provide a coordinated and quality effort that ensures success.
tkfm
Committed to MODx
*****
Posts: 843


WWW
« Reply #167 on: Oct 02, 2008, 07:35 PM »

I think this happens when '(blank)' template is used for the sitemap document.

I made a new template which contains only [*content*] and attached seoOverride TV to that simple template.
If you set that template to your sitemap document, URL rewriting of SEO Strict plugin works.
Logged
bmilton
Jr. Member
*
Posts: 30



WWW
« Reply #168 on: Oct 02, 2008, 08:27 PM »

Hey tkfm,

I'm not sure I follow or maybe we are talking about different things.

I also have a template just for the Sitemap.xml doc called "Sitemap".  This template only contains the line [*content*] like you said.

Can you clarify what you mean when you say:
I made a new template which contains only [*content*] and attached seoOverride TV to that simple template.

When you say attached SeoOverride TV to that template do you mean as an "Assigned Template Variable" ?  I've also done that.

When you say that "rewriting of SEO strict plugin works" do you mean that you are able to examine the resulting sitemap.xml file that is generated for the site and each URL listed in the sitemap reflects the proper setting for the corresponding document's SeoOverride TV?  That doesn't happen for me.  Every single URL generated uses the Friendly URL config that would appear without SEO Strict being installed. In my case it means every URL has a .html extension regardless of the SeoOverride setting.

-Brian
Logged

Brian Milton
Owner/Campaign Manager

SEO conductor
- We offer comprehensive SEO campaign management.
By orchestrating all aspects of your website, we provide a coordinated and quality effort that ensures success.
tkfm
Committed to MODx
*****
Posts: 843


WWW
« Reply #169 on: Oct 02, 2008, 08:36 PM »

When you say attached SeoOverride TV to that template do you mean as an "Assigned Template Variable" ?  I've also done that.
Sorry for my bad English, I meant 'Assign seoOverride TV to that new template' as you already did.

Quote
When you say that "rewriting of SEO strict plugin works" do you mean that you are able to examine the resulting sitemap.xml file that is generated for the site and each URL listed in the sitemap reflects the proper setting for the corresponding document's SeoOverride TV?
Yes. I am not doing so complicated URL rewriting, but seoOverride TV's value seems to be effected in the output of sitemap snippet.
But as I wrote at the following thread, I slightly changed URL rewriting rule of SEO Strict URL plungin.
I think that it's the only difference between us...
http://modxcms.com/forums/index.php/topic,12452.msg178032.html#msg178032
Logged
chinesedream
Sr. Member
****
Posts: 305


« Reply #170 on: Nov 28, 2008, 09:03 AM »

after upgraded to MODx 0.9.6.2 about a week ago, google no longer picking up new documents from my site, so I upgraded to  v1.0.8,  call the snippet in my sitemap.xml just like before

[!SiteMap? &format=`sp`!]

But it's showing me this:

This page contains the following errors:

error on line 1 at column 1: Document is empty
Below is a rendering of the page up to the first error. (me: nothing below this line of text)
Logged
Cole Henley
Jr. Member
*
Posts: 42



WWW
« Reply #171 on: Dec 11, 2008, 05:19 AM »

hey ho
trying out this nice wee snippet but cannot seem to avoid getting the following error message:
Quote
Fatal error: Cannot redeclare gettv() (previously declared in C:\Program Files\xampp\htdocs\modx_latest_171108\manager\includes\document.parser.class.inc.php(766) : eval()'d code:247) in C:\Program Files\xampp\htdocs\modx_latest_171108\manager\includes\document.parser.class.inc.php(766) : eval()'d code on line 270
any ideas what is causing this tout le monde?
Logged
moveax1
New Member
*
Posts: 3


« Reply #172 on: Dec 26, 2008, 04:46 PM »

Hey here is my HTML unsorted list with page levels snippet based on the code of the sitemap snippet.

If you think it is good, maybee you will add the functionality to the base snippet:

Code:
<?php
$startid 
= (isset($startid)) ? $startid 0;

$excludeTemplates = (isset($excludeTemplates)) ? $excludeTemplates : array();

$docs getDocsWithLevels($modx,$startid);

#var_dump($docs);

// get all templates
$select $modx->db->select("id, templatename"$modx->getFullTableName('site_templates'));
while (
$query $modx->db->getRow($select)) {
$allTemplates[$query['id']] = $query['templatename'];
}

$remainingTemplates $allTemplates;

// get templates to exclude, and remove them from the all templates list
if (!empty ($excludeTemplates)) {

$excludeTemplates explode(","$excludeTemplates);

// Loop through each template we want to exclude
foreach ($excludeTemplates as $template) {
$template trim($template);

// If it's numeric, assume it's an ID, and remove directly from the $allTemplates array
if (is_numeric($template) && isset($remainingTemplates[$template])) {
unset($remainingTemplates[$template]);
} else if (trim($template) && in_array($template$remainingTemplates)) { // If it's text, and not empty, assume it's a template name
unset($remainingTemplates[array_search($template$remainingTemplates)]);
}
// end foreach
}

$output .= "<ul class=\"sitemap\">\n";
// TODO: Sort the array on Menu Index
// TODO: Make a nested ul-li based on the levels in the document tree.
foreach ($docs[$startid] as $doc)
{
if (isset($remainingTemplates[$doc['template']]) && $doc['template']!=0)
{
$output  .= "  <li class=\"sitemap\">";
$output .= "<a href=\"[(site_url)][~" $doc['id'] . "~]\" class=\"sitemap\">" $doc['pagetitle'] . "</a>";
$output .= "</li>\n";


$id $doc['id'];
if(isset($docs[$id])) {
$output .= "<ul class=\"sitemap\">\n";
foreach($docs[$id] as $sub_doc) {
$output  .= "  <li class=\"sitemap\">";
$output .= "<a href=\"[(site_url)][~" $sub_doc['id'] . "~]\" class=\"sitemap\">" $sub_doc['pagetitle'] . "</a>";
$output .= "</li>\n";
}
$output .= "</ul>\n";
}
}

// end foreach
$output .= "</ul>\n";

return 
$output;

function 
getDocsWithLevels($modx,$startid)
{
// get children documents
$docs[$startid] = $modx->getActiveChildren($startid,'menuindex','asc','id,editedon,template,published,searchable,pagetitle,type');
// add sub-children to the list
foreach ($docs[$startid] as $doc)
{
$id $doc['id'];

if ($modx->getActiveChildren($id))
$docs[$id] = $modx->getActiveChildren($id,'menuindex','asc','id,editedon,template,published,searchable,pagetitle,type');
// end foreach
return $docs;
}
?>


It will output an unsorted list with the root documents. If there are Child Documents for the Root Document they will be displayed at the same place in a new <ul>

greets moveax1
Logged
syberknight
Jr. Member
*
Posts: 27


« Reply #173 on: Jan 16, 2009, 02:42 PM »

i'm not sure if my problem is specifically SiteMap related or not.
please see my posting @ http://modxcms.com/forums/index.php/topic,32170.0.html

it's regarding "invalid dates" (1969) showing up for a lot of pages.

thanx.jason.
Logged
ximarix
Jr. Member
*
Posts: 5


« Reply #174 on: Feb 14, 2009, 02:27 PM »

Is there any way to get this Snippet to display pages that are nested within Unpublished folders.  My blog pages are accessed via the Ditto Snippet, so are inside an Unpublished folder.

Try this:

Code:
<?php
# @line 119
if (!$doc[$excludeTV]) // remove
if (!$doc[$excludeTV] && $doc['published'] && $doc['template']!=0// add

# @line 198
$docs $modx->getActiveChildren($startid,'menuindex','asc','id,editedon,template'); //remove
$docs $modx->getAllChildren($startid,'menuindex','asc','id,editedon,template,published'); // add

# @line 206
if ($modx->getActiveChildren($id)) // remove
if ($modx->getAllChildren($id)) // add
?>

The change includes also filtering out documents with no template inteded for weblinks.

Is there a similar solution for SiteMap 1.0.8? Those lines have changed in the sourcecode, so I could not figure out how to include pages in unpublished folders to the sitemap.

Or an even better solution for me would be if I could include ALL documents and only exclude those I don't need using a TV..
Logged
worchyld
Sr. Member
****
Posts: 284

I love MODx!


« Reply #175 on: Mar 23, 2009, 10:00 AM »

This snippet creates a google "sitemap.xml", which I have got working, complete with the template variables.

BUT....

There is no title in the title bar when the Sitemap.xml is viewed. 

How do I set the title in the title bar using this snippet?

Thanks
Logged
spackko
Member
**
Posts: 97



« Reply #176 on: Mar 24, 2009, 04:02 AM »

I've run in some curious results
On my own site google claims that the sitemap does not contain any URL, other sites (same version 9.6.3 and sitemap 1.08) works fine.
The other sites are on the same server, configured exactly as the first one.

Google says : 500 (Internal ServerError) when trying to get that sitemap.

I then saved the sitemap to a textfile and uploaded it and google says' fine'.
« Last Edit: Mar 24, 2009, 04:05 AM by spackko » Logged

worchyld
Sr. Member
****
Posts: 284

I love MODx!


« Reply #177 on: Mar 25, 2009, 05:40 AM »

I have a specific request.

I have a table called holiday offers. I want to output the 10 latest records (based on date) inside the Google Sitemap.

How do I add such a table using this snippet?
Logged
knightknight
Full Member
***
Posts: 179


WWW
« Reply #178 on: Apr 14, 2009, 06:35 AM »

Has anyone come across a solution for blank xml list?

I've got the v1.0.8 snippet running on two MODx 9.6.3 sites on the same server, except one site is not displaying the any urls in the xml output. All I get is below:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
</urlset>

I also just tried to down grade to 1.0.7 but I got a parse error:

PHP error debug
  Error:    Invalid argument supplied for foreach()   
  Error type/ Nr.:    Warning - 2   
  File:    ../manager/includes/document.parser.class.inc.php(769) : eval()'d code   
  Line:    211

 Huh
« Last Edit: Apr 14, 2009, 06:41 AM by knightknight » Logged
Addgod
Jr. Member
*
Posts: 14


« Reply #179 on: May 21, 2009, 05:59 PM »

Is it just me, or does this snippet require that you use Friendly Urls to make it work?

Or am I doing something wrong?
Logged
Pages: 1 ... 10 11 [12] 13   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP

Copyright © 2005-2008 MODxCMS, All rights reserved. Contact Us
Styles by ziworks.com

Powered by SMF | SMF © 2006-2008, Simple Machines LLC

Valid XHTML 1.0! Valid CSS!