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
Comment #2
cchanana commentedComment #3
cchanana commentedComment #4
deepanker_bhalla commentedHi,
Please do not assign ticket yourself.
See the workflow https://www.drupal.org/node/532400
Comment #5
PA robot commentedThere 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.
Comment #6
cchanana commentedComment #7
cchanana commentedComment #8
cchanana commentedComment #9
cchanana commentedComment #10
sushilpal commentedHi Chandni,
Kindly see the automated review of your project as its showing some errors.
Link: https://pareview.sh/node/1648
thanks
S
Comment #11
cchanana commented@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
Comment #12
harsh.behl commentedHi 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.
Comment #13
cchanana commentedComment #14
cchanana commentedHi 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.
Comment #15
b n pandey commentedHi @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
Comment #16
cchanana commentedComment #17
harsh.behl commented@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.
Comment #18
cchanana commentedComment #19
cchanana commentedComment #20
cchanana commentedHi pen,
I have removed custom function from module file and defined in helper file. Please review the same.
Thanks,
Chandni
Comment #21
narendrarHi @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.
Comment #22
harsh.behl commentedHi @NarendraR,
Nice tips.
Comment #23
cchanana commentedHello NarendraR
Thanks for your valuable inputs, I have worked on all the issues you mentioned. Can you please review.
Comment #24
narendrarHi @cchanana,
I tested your module and it is working fine for me. Making it RTBC.
Comment #25
cchanana commentedComment #26
cchanana commentedComment #27
cchanana commentedComment #28
cchanana commentedComment #29
avpadernoThank 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.
Comment #30
avpaderno