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.


Redundant calendar entries in ocp_sitemap

Login / Search

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

Community saint

I have the following entries in the ocp_sitemap.xml which all display the calendar page for today:

Code

http://www.domain.com/calendar/misc.htm
http://www.domain.com/calendar/misc/2.htm
http://www.domain.com/calendar/misc/3.htm
http://www.domain.com/calendar/misc/4.htm
http://www.domain.com/calendar/misc/5.htm
http://www.domain.com/calendar/misc/9.htm
http://www.domain.com/calendar/misc/7.htm
http://www.domain.com/calendar/misc/8.htm
http://www.domain.com/calendar/misc/10.htm
http://www.domain.com/calendar/misc/11.htm
http://www.domain.com/calendar/misc/12.htm

At first I thought they were calendar months but 1 and 6 are missing. Whatever they are supposed to be, they are currently just redundant links in my sitemap.

Bob
Back to the top
 
Posted
Rating:
#75791
Avatar

Thanks. Fix is to change line 283 (actually less, as I've since added lines above this), so maybe line ~240 of site/pages/modules/calendar.php from:

Code

                  $tree[]=array('_SELF:_SELF:type=misc:'.strval($row['id']),'calendar',$row['id'],$row['text_original'],array());
to:

Code

                  $tree[]=array('_SELF:_SELF:type=misc:int_'.strval($row['id']).'=1','calendar',$row['id'],$row['text_original'],array());


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:
#75792
Avatar

To explain, these links are for filtered views of the calendar, for each event type.


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:
#75810
Avatar

Community saint

Chris-

I made the change suggested (at line 251 in 7.1.5) but a newly-generated sitemao still contains the entries.

Bob
Back to the top
 
Posted
Rating:
#75811
Avatar

Are you sure? They should be slightly different.


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:
#75814
Avatar

Community saint

I checked each URL in the sitemap and it still leads to todays calendar page.

I double-checked my may change in site/pages/modules/calendar.php and it matched the revision.

Perhaps it has something to do with other changes you have made to the calendar? It's not a huge thing and can probably wait till 7.2 as long as it is fixed in that version.

Bob
Back to the top
 
Posted
Rating:
#75815
Avatar

It would lead to the same calendar page, but filtered to show just one event type.


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:
#75816
Avatar

Whoops, I'm wrong…


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:
#75817
Avatar

Community saint

Chris Graham said

It would lead to the same calendar page, but filtered to show just one event type.
Ahh…that makes sense. I have no entries for today so the page looks the same. Perhaps there would be some indication that the results shown are for a specific event type when displaying the page.

Bob
Back to the top
 
Posted
Rating:
#75818
Avatar

Actually there's a different line for the XML sitemap (the one I changed was for the menu editor)…

Code

            $pagelink=$pagelink_stub.'misc:'.strval($row['id']);
to:

Code

               $pagelink=$pagelink_stub.'misc:int_'.strval($row['id']).'=1';

It's an interesting question whether these should be there at all. Ultimately I want to have just one system in ocPortal for sitemaps being enumerated (currently there are a few, it's a mess). You could argue it is better just to let Google have one unfiltered calendar view, but I definitely want the menu editor to be able to find the filter links.


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:
#75820
Avatar

Community saint

Chris-

I think it would actually be better to provide Google with a single unfiltered link because all the links now currently share the same meta description and title tag which offers little benefit to Google or Google's users.

Bob
Back to the top
 
Posted
Rating:
#75821
Avatar

Community saint

Chris Graham said

Actually there's a different line for the XML sitemap (the one I changed was for the menu editor)…

Chris-

Should the first change be reverted or left as revised?

Bob
Back to the top
 
Posted
Rating:
#75822
Avatar

no, both fixes are 'necessary'


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:
#75823
Avatar

Community saint

Chris-

After making the second change, I get the following error:

Code

PHP NOTICE [8] Undefined index: id in sources/sitemap.php(277) : eval()'d code on line 71 (version: 7.1.5, PHP version: 5.2.17, URL: /data/force_sitemap_generation.php



Expand: Stack trace Stack trace


Bob
Back to the top
 
Posted
Rating:
#75824
Avatar

Whoops, third time lucky I hope. I actually tested it this time ;).

Attachment
» Download: calendar.php (69 Kb, 73 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:
#75829
Avatar

Community saint

Chris-

That seems to have done the trick as long as you planned to include only a single unfiltered link (which I think is the way to go).

Thanks for your help.

Bob
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: