Comments

arhak’s picture

Status: Active » Postponed (maintainer needs more info)

please read HOWTO: Make A GOOD issue report

The Description field is wide open which leaves you a lot of space to say a lot or a little. The Description takes the title one step further. Generally speaking, the majority of the time spent fixing an issue is spent on understanding the problem and finding the cause of that issue. The goal of the description is to state the exact set of conditions that cause a problem and the resultant undesirable state of the system so that the developer spends as little time as possible understanding your situation.

mikey_p’s picture

Status: Postponed (maintainer needs more info) » Needs work
StatusFileSize
new1.91 KB

I tried to write a test for this and in the process wrote a function that should fail in verifyExternalMenuItem, but is not failing, so not sure what is up with assertTtitle().

dave reid’s picture

If you're going to verify external sites, you should not be checking title (can be volatile), but rather, check $this->getUrl() == the menu path.

mikey_p’s picture

Status: Needs work » Needs review
StatusFileSize
new2.48 KB

Now checks URL and title, also checks adding a full url but without the protocol (http://) in addInvalidMenuItem()

Status: Needs review » Needs work

The last submitted patch failed testing.

mikey_p’s picture

Man I am not having luck with the testing bot lately. I can't recreate any failures here on a clean checkout of HEAD.

This may be dependent on http://drupal.org/node/345632.

mikey_p’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch failed testing.

marcingy’s picture

Version: 7.x-dev » 8.x-dev
Component: tests » menu system

Bumping to head

marcingy’s picture

Issue tags: +Needs backport to D7

Adding tag

aspilicious’s picture

This isn't fixed yet and the menu tests are different now...

aspilicious’s picture

Status: Needs work » Needs review
StatusFileSize
new2.45 KB

And here is an updated patch

aspilicious’s picture

StatusFileSize
new2.45 KB

Small typo

tim.plunkett’s picture

Status: Needs review » Needs work
+++ b/core/modules/menu/lib/Drupal/menu/Tests/MenuTest.phpundefined
@@ -370,6 +374,28 @@ class MenuTest extends WebTestBase {
+    $this->assertTitle($title, t('External menu link link title was correct'));
+    $this->assertTrue($this->getUrl() == 'http://www.iana.org/domains/example/', t('External menu link URL was correct'));

Assertion messages shouldn't use t().

As far as using external URLs, I'd like to think example.org, iana.org, and drupal.org are safe. But I'm not sure.

chx’s picture

I would rather see us testing that we landed on example.com and not follow the redirect. Much to my surprise this is not possible currently so I have filed #1668748: Impossible to test for redirects

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

quietone’s picture

Issue summary: View changes
Status: Needs work » Closed (outdated)
Issue tags: +Bug Smash Initiative

Testing of an external link was added in Drupal 8.0.x in #2257229: Cannot add external url or <front> as menu item.

I do believe this is now outdated.