Skip to content
Snippets Groups Projects
Verified Commit 6067ed42 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #221761 by mohit_aghera, pameeela, dixon_, catch, ged3000, sun,...

Issue #221761 by mohit_aghera, pameeela, dixon_, catch, ged3000, sun, deepakaryan1988, smustgrave, stefank, jredding, dawehner, harshit97, xjm, jhedstrom, geertvd, alexpott, Dries: Hide reply link for unpublished comments
parent 0c9e4a4b
Branches
Tags
19 merge requests!11131[10.4.x-only-DO-NOT-MERGE]: Issue ##2842525 Ajax attached to Views exposed filter form does not trigger callbacks,!8736Update the Documention As per the Function uses.,!8513Issue #3453786: DefaultSelection should document why values for target_bundles NULL and [] behave as they do,!3878Removed unused condition head title for views,!3818Issue #2140179: $entity->original gets stale between updates,!3742Issue #3328429: Create item list field formatter for displaying ordered and unordered lists,!3731Claro: role=button on status report items,!3154Fixes #2987987 - CSRF token validation broken on routes with optional parameters.,!3133core/modules/system/css/components/hidden.module.css,!2964Issue #2865710 : Dependencies from only one instance of a widget are used in display modes,!2812Issue #3312049: [Followup] Fix Drupal.Commenting.FunctionComment.MissingReturnType returns for NULL,!2378Issue #2875033: Optimize joins and table selection in SQL entity query implementation,!2062Issue #3246454: Add weekly granularity to views date sort,!10223132456: Fix issue where views instances are emptied before an ajax request is complete,!877Issue #2708101: Default value for link text is not saved,!617Issue #3043725: Provide a Entity Handler for user cancelation,!579Issue #2230909: Simple decimals fail to pass validation,!560Move callback classRemove outside of the loop,!555Issue #3202493
Pipeline #292416 passed
Pipeline: drupal

#292439

    Pipeline: drupal

    #292435

      Pipeline: drupal

      #292424

        ......@@ -184,7 +184,8 @@ protected function buildLinks(CommentInterface $entity, EntityInterface $comment
        ];
        }
        $field_definition = $commented_entity->getFieldDefinition($entity->getFieldName());
        if ($entity->access('create')
        if ($entity->isPublished()
        && $entity->access('create')
        && $field_definition->getSetting('default_mode') === CommentManagerInterface::COMMENT_MODE_THREADED) {
        $links['comment-reply'] = [
        'title' => t('Reply'),
        ......
        ......@@ -18,6 +18,31 @@ class CommentThreadingTest extends CommentTestBase {
        */
        protected $defaultTheme = 'stark';
        /**
        * Check the reply link on unpublished comments.
        */
        public function testCommentReplyLinkUnpublished(): void {
        // Set comments to have a subject with preview disabled.
        $this->setCommentPreview(DRUPAL_DISABLED);
        $this->setCommentForm(FALSE);
        $this->setCommentSettings('default_mode', CommentManagerInterface:: COMMENT_MODE_THREADED, 'Comment paging changed.');
        // Create a node.
        $this->drupalLogin($this->adminUser);
        $this->node = $this->drupalCreateNode(['type' => 'article', 'promote' => 1, 'uid' => $this->webUser->id()]);
        // Post comment #1.
        $comment_text = $this->randomMachineName();
        $comment1 = $this->postComment($this->node, $comment_text, '', TRUE);
        $this->drupalGet($this->node->toUrl());
        $this->assertSession()->pageTextContains('Reply');
        $comment1->setUnpublished();
        $comment1->save();
        $this->drupalGet($this->node->toUrl());
        $this->assertSession()->pageTextNotContains('Reply');
        }
        /**
        * Tests the comment threading.
        */
        ......@@ -33,7 +58,6 @@ public function testCommentThreading(): void {
        $this->node = $this->drupalCreateNode(['type' => 'article', 'promote' => 1, 'uid' => $this->webUser->id()]);
        // Post comment #1.
        $this->drupalLogin($this->webUser);
        $subject_text = $this->randomMachineName();
        $comment_text = $this->randomMachineName();
        ......
        0% Loading or .
        You are about to add 0 people to the discussion. Proceed with caution.
        Please register or to comment