I currently see no way to disable link checking while you have the module enabled except for unchecking node types, comments, and blocks on the admin page. Seeing as how there are other integrations in the issue queue, it would require many variable sets for an admin to turn off link checking for whatever reason, bogging down site etc., and then turn it back on later with the same settings.

I propose to add a check to linkchecker_cron() to return if a "don't check links on cron" variable is set.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

afinnarn created an issue. See original summary.

afinnarn’s picture

Version: 7.x-1.2 » 7.x-1.x-dev
hass’s picture

Status: Active » Postponed (maintainer needs more info)

You could disable the module temporarily or use a module that allows you to disable the cron task of linkchecker. It would also allow you to control better when linkchecker runs. e.g. if you like it to run every 2 hours or every 3 hours. I guess this would fit here, too and we can keep these edge case extra code out.

Does this work for you, too?

afinnarn’s picture

The extra module to disable linkchecker makes more sense than disabling linkchecker temporarily. In my case, the dependency tree would make me disable other modules that I need the functionality always on, and I want to keep those modules bundled with linkchecker.

I do think an option to suspend link checking while the module is still on makes sense from a usability perspective rather than having to disable the module or alter cron to stop link checking. A site builder wouldn't know how to create a custom module, and an admin without privileges to administer modules but permissions to administer the linkchecker settings couldn't disable the module.

Thoughts?

afinnarn’s picture

Status: Postponed (maintainer needs more info) » Needs review
hass’s picture

Linkchecker has no dependencies. It can be disabled without any side effects. As noted there are modules that allow you to disable cron for individual modules. Please try these.

NancyDru’s picture

Yes, this is a valuable feature. Most of us have dev and test versions of the site. We can put configuration variables in that environment's settings.php. We do this with the Reroute_Email module: it is off in production and on in the dev and test environments. So, when we refresh the database, the environment's settings.php forces it to be on, and the production settings forces it to be off.

james.williams’s picture

I believe this feature also helps this module has great value for auditing the existence of links without having to check whether the links are broken or not. My client's content editors want to know where certain links are in their content so that they can go and update them all, without needing to care about checking about whether links are broken or not. In fact, this particular site is behind a firewall so wouldn't be able to even make successful checks anyway.

solideogloria’s picture

You don't need to add to this module to do this. Go to /admin/config/system/cron/settings and disable the linkchecker_cron cron task.

gaurav-mathur’s picture

Assigned: Unassigned » gaurav-mathur
gaurav-mathur’s picture

Assigned: gaurav-mathur » Unassigned