wilr / silverstripe-googlesitemaps

Google Sitemaps module for the SilverStripe CMS
BSD 3-Clause "New" or "Revised" License
74 stars 95 forks source link

BUGFIX: Fixed issue where classes not in the sitemap would cause a crash #106

Closed UndefinedOffset closed 8 years ago

UndefinedOffset commented 8 years ago

When a class is not allowed in the sitemap a DataList is attempted to be created regardless whether it exists or is even allowed in the sitemap. If the class does not exist this results in a "Can't find data classes (classes linked to tables)" error. If the class is a DataObject his results in a "the method 'canincludeingooglesitemap' does not exist" error. This pull request checks to see if the class is allowed in the sitemap, if it does not a 404 is returned.

helpfulrobot commented 8 years ago

@UndefinedOffset, thanks for your PR! By analyzing the blame information on this pull request, I identified @wilr to be a potential reviewer

wilr commented 8 years ago

👍 tests pass.