CMS MADE SIMPLE FORGE

SEOTools2

 

[#7796] php 5.4.* notice and sitemap

avatar
Created By: info andries (andriesinfoserv)
Date Submitted: Mon Apr 09 14:20:17 -0400 2012

Assigned To:
Version: 1.0.8
CMSMS Version: None
Severity: Major
Resolution: Fixed
State: Closed
Summary:
php 5.4.* notice and sitemap
Detailed Description:
upgraded to 1.0.8. seotools2 does not fail to write sitemap.xml to directory,
however it only writes one url to sitemap.xml. it's the last top level page of
site that has sub pages. https, show in menu and active. are enabled; searchable
and cacheable are disabled for this page. most other pages are cacheable and
searchable but not all. not sure why that is the only one in sitemap. i still
have the same notice in debug at first seotools2 gui admin page:

Notice: Undefined index: message in
/home/www/site/tmp/templates_c/SEOTools2^%%46^465^46597A2A%%module_file_tpl%3ASEOTools2%3Badminpanel.tpl.php
on line 16

thanks again for your fast work.


History

Comments
avatar
Date: 2012-04-09 17:35
Posted By: Prue Rowland (psy)

Go into SEOTools2 and ensure that all the pages you want to incude in the
sitemap are ticked in the 'Indexable' column.

The default behaviour of the original module was to only tick the default
content page. You had to then manually select in the 'Page Settings' tab, the
pages you wanted included in sitemap.xml.

In the first release of seotools2, I added code in action.default.php to
automatically include new pages, remove deleted pages and ensure inactive pages
are removed from the sitemap.xml.  It was not practical however to change
existing pages marked as 'Not indexable' to 'Indexable' as users may have a
valid reason for excluding pages.

I cannot recreate the Undefined Index message.  When I regenerate the sitemap,
the url shows '....message=sitemap_regenerated&tab=sitemapsettings' and the
admin message displays correctly, ie: 'Both the sitemap and the robots.txt files
have been successfully regenerated.'  Have you tried clearing the cache?


      
avatar
Date: 2012-04-09 20:01
Posted By: info andries (andriesinfoserv)

the pages are set as indexable. the admin and url show sitemap as being
generated succesfully. sitemap is generated but only contains one url and it is
not the default page. not sure why it is the page it is. php notice  is only
shown after navigating away from seotools sitemap generation success
message/page and back to seotools admin from another admin page while in debug
and strict error reporting, as the success message takes the place of the notice
i refer to. clearing site cache doesn't help for me.
thanks
      
avatar
Date: 2012-04-09 20:34
Posted By: Prue Rowland (psy)

Is the last page that shows http or https?  that may have a bearing altho I
thought I'd fixed all that. Maybe not...

Re the error message, thanks for detailing the scenario.  I now understand why
and where it happens.

In action.defaultadmin.php please change line 99 from:

if (isset($_GET['message'])) {
$this->smarty->assign('message',$this->showMessage($this->lang($_GET['message'])));
}

to:

if (isset($_GET['message'])) {
$this->smarty->assign('message',$this->showMessage($this->lang($_GET['message'])));
} else {
  $this->smarty->assign('message','');
}

It works for me and if for you too, I'll include it in the next release.


      
avatar
Date: 2012-04-09 21:50
Posted By: info andries (andriesinfoserv)

your fix worked for the notice. great! i'm not sure what you mean by "the last
page that shows", but assuming you mean the only url/page in the sitemap.xml
that is generated by seotools2, it is https. if there is anything more i can
provide to help you narrow it down, let me know.
thanks
      
Updates

Updated: 2013-07-27 19:27
cmsms_version_id: 29495 => -1
state: Open => Closed

Updated: 2012-04-10 20:41
resolution_id: 5 => 7

Updated: 2012-04-09 17:35
resolution_id: => 5