HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


[v5.0.1] Question: XML Sitemap to include catalogue entries

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#63008 (In Topic #13671)
Avatar

Well-settled

XML Sitemap creation: How to include catalogue entries

My automatic XML sitemap creation doesn't include catalogue entries. It appears to contain catalogue index page as well as catalogue search pages. For some reason, Google doesn't seem to grab my catalogue sub pages (catalogue entries), so I wonder if there is something I can "enable" to populate the catalogue entries into the XML sitemap (data_custom/ocp_sitemap.xml) with changefrequency = weekly.

- Auto-submit sitemap is enabled
- cron_bridge.php is scheduled and is updating ocp_sitemap.xml as expected

Thank you in advance

Dirk
Back to the top
 
Posted
Rating:
#63023
Avatar

Looks like the catalogue and download systems have both been missed out somehow, I'm working on resolving this now.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#63026
Avatar

Fix attached.

Attachment
site/pages/modules/catalogues.php
» Download: catalogues.php (51 Kb, 137 downloads so far)


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#63041
Avatar

Fan in training

I needed this patch. Thank you!
Back to the top
 
Posted
Rating:
#63127
Avatar

Well-settled

Hi Chris,

Thanks for the fix. Unfortunatelly, I am getting the following error now:

[30-Sep-2010 20:58:03] PHP Fatal error:  Call to a member function evaluate() on a non-object in /opt/lampp/htdocs/website/sources/sitemap.php(268) : eval()'d code on line 83
[30-Sep-2010 20:58:03] PHP Error:  Call to a member function evaluate() on a non-object in /opt/lampp/htdocs/website/sources/sitemap.php(268) : eval()'d code on line 83
[30-Sep-2010 20:58:03] ocPortal:  PHP ERROR [1] Call to a member function evaluate() on a non-object in /opt/lampp/htdocs/website/sources/sitemap.php(268) : eval()'d code on line 83 (version: 5.0.1, PHP version: 5.2.1, URL: /opt/lampp/htdocs/website/data/cron_bridge.php)


Btw, I see the ocp_sitemap.xml will be updated once an hour (if no error), how do I force cron_bridge.php to update the sitemap immediately?

Thanks,
Dirk
Back to the top
 
Posted
Rating:
#63138
Avatar

Well-settled

Fixed it by adding the below bold line:



function get_sitemap_pagelinks($callback,$member_id,$depth,$pagelink_
stub,$parent_pagelink=NULL,$recurse_level=0,$category_data=NU
LL,$entry_data=NULL)
   {
      GLOBAL $parent_pagelink_orig;
      $parent_pagelink_orig=$parent_page
link;
Back to the top
 
Posted
Rating:
#63140
Avatar

Well-settled

Next issue is that only the first catalogue (I run a bunch of custom catalogues) find its way to the ocp_sitemap.xml.

Can you help to find the root cause, please?

Thanks
Back to the top
 
Posted
Rating:
#63178
Avatar

Well-settled

Anybody out there who knows how to make this walk thru all catalogues and not the first one only?

Thanks.
Back to the top
 
Posted
Rating:
#63290
Avatar

The error you found, I think a different fix is needed (which I've now done locally - and probably you will get when I look into your next two posts in this topic). But so long as you got it working.

"Btw, I see the ocp_sitemap.xml will be updated once an hour (if no error), how do I force cron_bridge.php to update the sitemap immediately?"

Call up…
/data/force_sitemap_generation.php


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#63291
Avatar

Seems to work for me for all the catalogues.
Maybe it died part way through with the previous error, so it looked stopped?

Here is the proper fix for the error you saw (affects certain catalogue configurations)…
Attachment
» Download: catalogues.php (51 Kb, 132 downloads so far)




Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#63485
Avatar

Well-settled

Fixed,

-> but it seems the fix didn't find its way to v5.0.2 beta
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: