Change the hook_menu for a configuration file.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

davidjguru created an issue. See original summary.

davidjguru’s picture

Well, I've created a small patch that establishes access through the Settings menu, in the "Search and metadata" zone.
I have also removed the hook_requirements( ), because in Drupal 8 Clean URLs are enabled by default.

davidjguru’s picture

Status: Active » Needs review
krina.addweb’s picture

FileSize
15.34 KB

@davidjguru, thanks for adding patch, but while checking your patch I faced the encountered error could you please help me out by resolving it.
I simply access the page from the configuration. I used simplytest.me to test. Thanks!.

davidjguru’s picture

Hi @krina.addweb,
Well, I'm working in the module step by step and the patch is only for the routing / menu connection.
That error is due the module code from the form is waiting for migration. I'm working on it now.
It will be soon.

Greetings.

krina.addweb’s picture

Okay Thanks for the update @davidjguru

pcambra’s picture

Status: Needs review » Needs work
+++ b/humanstxt.module
@@ -91,27 +73,6 @@ function _humanstxt_get_content() {
-  switch ($phase) {
-    case 'runtime' :
-      // Module cannot work without Clean URLs.
-      $request = \Drupal::request();
-      if (!$clean_urls = $request->attributes->get('clean_urls')) {
-        $requirements['humanstxt_cleanurl'] = array(
-          'title' => t('Humanstxt'),
-          'severity' => REQUIREMENT_ERROR,
-          'value' => t('Clean URLs are mandatory for this module.'),
-        );
-      }

Why are we removing this? the clean urls are still required for the module, aren't they?

Ah, https://www.drupal.org/docs/8/clean-urls-in-drupal-8/fix-drupal-8-clean-... :)

pcambra’s picture

Status: Needs work » Needs review

  • pcambra committed b8154d6 on 8.x-1.x authored by davidjguru
    Issue #3049117 by davidjguru, pcambra: Create access from menu to the...
pcambra’s picture

Status: Needs review » Fixed

Many thanks @davidjguru, merged in!

Status: Fixed » Closed (fixed)

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