Domain GoogleNews SiteMap
----------
This module generates a Google News sitemap specific to each domain feed based on the content created
within the last 48 hours as default configration.

NOTE : The content whoes domain source is not set will not be visible as google new sitemap content.

Features
-------------------------------------------------------------------------------
* Domain Google News -compatible sitemap XML output.

* Selection of content types to be output is configurable.

* Output XML file can be cached to reduce server load with a configurable timer.

Project Url

https://www.drupal.org/project/domain_googlenews_sitemap

Project Git Url

git clone --branch 8.x-1.x https://git.drupal.org/sandbox/cchanana/2869634.git domain_googlenews_sitemap

Configuration / Usage
-------------------------------------------------------------------------------
1. Without any configuration, the module generates a Domain specific Google News sitemap
feed for all nodes from the past 48 hours at the following URL:
http://example.com/googlenews.xml

2. All configuration is handled via the main settings page:
admin/config/services/googlenews

3. The following items may be controlled:

* The publication name defaults to the site's name, this may be overridden.

* By default all content types will be used in the sitemap, this may be
changed as needed; as Google News expects only *news* articles, choose
the content types wisely.

* The publication name on the sitemap file defaults to the site name.

* Only content created within the past 48 hours will be displayed, this can
be changed though the default is recommended.

* To aid with site performance, the file's output will be cached for 15
minutes; this can be increased as necessary.

4. Visit the sitemap file to confirm it contains the desired content:
http://example.com/googlenews.xml

5. Use the Google Webmaster Tools to submit the sitemap file per the official
documentation:
http://support.google.com/webmasters/bin/answer.py?hl=en&answer=74289

Manual Review done for other Projects:
https://www.drupal.org/node/2875849#comment-12072051
https://www.drupal.org/node/2875653#comment-12072123
https://www.drupal.org/node/2871500#comment-12072226

Automated Review done for other Projects:
https://www.drupal.org/node/2833336#comment-12041743
https://www.drupal.org/node/2870531#comment-12042917
https://www.drupal.org/node/2870685#comment-12045342

Comments

cchanana created an issue. See original summary.

cchanana’s picture

Issue summary: View changes
cchanana’s picture

Issue summary: View changes
deepanker_bhalla’s picture

Assigned: cchanana » Unassigned

Hi,

Please do not assign ticket yourself.
See the workflow https://www.drupal.org/node/532400

PA robot’s picture

Issue summary: View changes
Status: Needs review » Needs work

There are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpsgitdrupalorgsandboxcchanana2869634git

Fixed the git clone URL in the issue summary for non-maintainer users.

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

cchanana’s picture

Issue summary: View changes
cchanana’s picture

Issue summary: View changes
cchanana’s picture

Issue tags: -PAreview: review bonus
cchanana’s picture

Issue summary: View changes
sushilpal’s picture

Hi Chandni,

Kindly see the automated review of your project as its showing some errors.

Link: https://pareview.sh/node/1648

thanks
S

cchanana’s picture

Status: Needs work » Needs review

@sushilpal thanks for reviewing and pointing out these issues.

i have updated code and fixed all issued mentioned under link : https://pareview.sh/node/1648

harsh.behl’s picture

Hi cchanana,

I am getting following error on url: http://example.com/googlenews.xml

Uncaught PHP Exception Drupal\\Core\\Database\\DatabaseExceptionWrapper: "SQLSTATE[42S02]: Base table or view not found: 1146 Table 'dconsole.node__field_domain_access' doesn't exist: SELECT n.nid AS nid\nFROM \n{node_field_data} n\nLEFT OUTER JOIN {node__field_domain_access} d ON n.nid=d.entity_id\nWHERE (n.status = :db_condition_placeholder_0) AND (n.type IN (:db_condition_placeholder_1, :db_condition_placeholder_2)) AND (n.created >= :db_condition_placeholder_3) AND (d.field_domain_access_target_id = :db_condition_placeholder_4) \nORDER BY n.created DESC\nLIMIT 1000 OFFSET 0; Array\n(\n [:db_condition_placeholder_0] => 1\n [:db_condition_placeholder_1] => article\n [:db_condition_placeholder_2] => page\n [:db_condition_placeholder_3] => 1492415986\n [:db_condition_placeholder_4] => harsh_com\n)\n" at /var/www/html/dconsole/core/lib/Drupal/Core/Database/Connection.php line 671

node__field_domain_access field is missing so you need to add dependency for domain_access & domain_source module in your .info.yml file.

cchanana’s picture

Issue summary: View changes
Issue tags: +PAreview: review bonus
cchanana’s picture

Hi pen,

Thanks for your review.

All the relevant dependency of module has been added in info.yml file and README.txt has also been updated.

b n pandey’s picture

Status: Needs review » Reviewed & tested by the community

Hi @cchanana

This module works for me. I review this module manually and did not find any error.
Finally I tested this module on pareview.sh and did not find any error or warning.
https://pareview.sh/node/1648

Thanks

cchanana’s picture

Issue summary: View changes
harsh.behl’s picture

Status: Reviewed & tested by the community » Needs work

@B N Pandey I think you missed something.

@cchanana

In file domain_googlenews.module file I have found a function domain_googlenews_list_nodes that is being called in GoogleNewsController.php on line 97 & 98. Which you can define with controller & also services like,

$negotiator = \Drupal::service('domain.negotiator');
$config = \Drupal::config('googlenews_admin.settings');
$db = \Drupal::database();

can be easily available in controller through injection.

This is not the application blocker but definitely not the right approach.

Removing the RTBC Tag.

cchanana’s picture

Issue summary: View changes
cchanana’s picture

Issue tags: -PAreview: review bonus
cchanana’s picture

Status: Needs work » Needs review

Hi pen,

I have removed custom function from module file and defined in helper file. Please review the same.

Thanks,
Chandni

narendrar’s picture

Hi @cchanana,

Below are some suggestions:

1. Add package Domain instead of custom in info.yml file
2. Remove configurations when module is uninstalled
e.g:
function domain_googlenews_uninstall() {
// Remove configurations.
\Drupal::configFactory()->getEditable('googlenews_admin.settings')->delete();
}

// Display sitemap with correct XML header using http response class.
3. $response = new Response($content, Response::HTTP_OK, ['content-type' => 'application/xml']);
return $response;

instead of
header("Content-type: text/xml");
echo $content;
exit();

Apart from these, this module is working fine for me.

harsh.behl’s picture

Hi @NarendraR,

Nice tips.

cchanana’s picture

Hello NarendraR

Thanks for your valuable inputs, I have worked on all the issues you mentioned. Can you please review.

narendrar’s picture

Status: Needs review » Reviewed & tested by the community

Hi @cchanana,

I tested your module and it is working fine for me. Making it RTBC.

cchanana’s picture

Issue summary: View changes
cchanana’s picture

Issue summary: View changes
cchanana’s picture

Issue summary: View changes
Issue tags: +PAreview: review bonus
cchanana’s picture

Issue summary: View changes
avpaderno’s picture

Assigned: Unassigned » avpaderno
Status: Reviewed & tested by the community » Fixed

Thank you for your contribution!
I am going to update your account so you can opt into security advisory coverage now.
These are some recommended readings to help with excellent maintainership:

You can find more contributors chatting on the IRC #drupal-contribute channel. So, come hang out and stay involved.
Thank you, also, for your patience with the review process.
Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

I thank all the dedicated reviewers as well.

avpaderno’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.