CommentFileSizeAuthor
#11 interdiff.txt3.18 KBkmoll
#11 2839812-10.patch16.68 KBkmoll
#2 2839812-2.patch15.38 KBnaveenvalecha

Comments

naveenvalecha created an issue. See original summary.

naveenvalecha’s picture

Status: Active » Needs review
StatusFileSize
new15.38 KB

Here's the attached patch with cleanup. Please do test all the functionality of changes after applying the patch.
I have not tested the functionality after doing the changes.

manjit.singh’s picture

Thanks @naveenvalecha for creating this issue, We will test your patch locally.

panshulk’s picture

Hi @naveenvalecha thanks a lot for spending time on this.
After applying the patch I got the following message :

Checking patch README.txt...
Checking patch adobeanalytics.module...
Checking patch adobeanalytics.permissions.yml...
error: while searching for:
administer AdobeAnalytics configuration:
title: 'Configure Adobe Analytics settings'
description: 'Configure Adobe Analytics settings.'
#access to Configure the Adobeanalytics form is restricted to admin only.
restrict access: true

error: patch failed: adobeanalytics.permissions.yml:1
error: adobeanalytics.permissions.yml: patch does not apply
Checking patch composer.json...
Checking patch config/install/adobeanalytics.settings.yml...
Checking patch config/schema/adobeanalytics.schema.yml...
Checking patch src/AdobeAnalyticsHelper.php...
Checking patch src/Form/AdobeanalyticsAdminSettings.php...

Seems like the patch was not created properly or am I missing out on something?
It would be great if you can provide another patch for this.

Thank You :)

naveenvalecha’s picture

@panshulk,
Is your local codebase up to date ?
Could you post O/P of git log

panshulk’s picture

Hi @naveen

yes the repository is up to date

The o/p if git log is as follows

commit 203f6bb7b4798f5337ad261664b8f991b326e6ad
Author: kmoll
Date: Fri Dec 9 11:42:00 2016 -0500

Issue #2831117 by badjava, kmoll: Add composer.json file for module

commit d663e9991acc27621bcfd2d588ed268aa4be8523
Author: kmoll
Date: Fri Dec 9 10:40:33 2016 -0500

Issue #2700715 by kmoll, zeeshan_khan, heddn, panshulk, ARUN AK, Manjit.Sing

commit 8470a6f64566406e403d04d2db506c0d1aecd1b2
Author: Zeeshan Khan
Date: Mon Nov 28 14:47:03 2016 +0530

Issue #2700715: Removed define from module and used const instead and moved

commit b455a80d3f682bdf10d631988ba9b0e1687ca594
Author: Zeeshan Khan
Date: Mon Nov 28 14:43:53 2016 +0530

Issue #2700715: Removed define from module and used const instead.
:...skipping...
commit 203f6bb7b4798f5337ad261664b8f991b326e6ad
Author: kmoll
Date: Fri Dec 9 11:42:00 2016 -0500

Issue #2831117 by badjava, kmoll: Add composer.json file for module

commit d663e9991acc27621bcfd2d588ed268aa4be8523
Author: kmoll
Date: Fri Dec 9 10:40:33 2016 -0500

Issue #2700715 by kmoll, zeeshan_khan, heddn, panshulk, ARUN AK, Manjit.Sing

commit 8470a6f64566406e403d04d2db506c0d1aecd1b2
Author: Zeeshan Khan
Date: Mon Nov 28 14:47:03 2016 +0530

naveenvalecha’s picture

repo on my system also points to the same head 203f6bb7b4798f5337ad261664b8f991b326e6ad
Could you give me the commit access. I'll try to commit myself.

commit 53f1ffd7088370ab5e512224b1eb493b66ff082c
Author: Naveen Valecha <er.naveenvalecha@gmail.com>
Date:   Thu Dec 29 12:47:11 2016 +0530

    Code improvements.

commit 203f6bb7b4798f5337ad261664b8f991b326e6ad
Author: kmoll <kmoll@840556.no-reply.drupal.org>
Date:   Fri Dec 9 11:42:00 2016 -0500

    Issue #2831117 by badjava, kmoll: Add composer.json file for module

commit d663e9991acc27621bcfd2d588ed268aa4be8523
Author: kmoll <kevin.j.moll@gmail.com>
Date:   Fri Dec 9 10:40:33 2016 -0500

    Issue #2700715 by kmoll, zeeshan_khan, heddn, panshulk, ARUN AK, Manjit.Singh, RavindraSingh, naveenvalecha, klausi, heykarthikwithu, esolano: D8 Port of Adobe Analytics (SiteCatalyst) to D8

commit 8470a6f64566406e403d04d2db506c0d1aecd1b2
Author: Zeeshan Khan <princegill81@gmail.com>
Date:   Mon Nov 28 14:47:03 2016 +0530

    Issue #2700715: Removed define from module and used const instead and moved it to class.

commit b455a80d3f682bdf10d631988ba9b0e1687ca594
Author: Zeeshan Khan <princegill81@gmail.com>
Date:   Mon Nov 28 14:43:53 2016 +0530

    Issue #2700715: Removed define from module and used const instead.

commit 6f3289bdbdbe28758d17017d4cc8f089e0edc9be
Author: Zeeshan Khan <princegill81@gmail.com>
Date:   Mon Nov 28 14:22:58 2016 +0530

    Issue #2700715: Fixed code standard warnings.
panshulk’s picture

Hi @naveenvalecha , I have provided you with the commit access, Now you can make the desired code improvements.

kmoll’s picture

I will review this patch today. @naveenvalecha, is there a specific reason the composer.json file was removed in the patch?

timmillwood’s picture

Status: Needs review » Needs work

I took a look at the patch in #2 and think there are a number of things todo.

However these are really scraping the barrel for nit picks and I think this issue should be a blocker for anything.

  1. +++ b/adobeanalytics.module
    @@ -63,15 +63,13 @@ function adobeanalytics_page_bottom(&$variables) {
    +        $config->get('codesnippet'), $context, array(
    

    As we are looking at really picky nit picks, I think we should move to short syntax arrays.

  2. +++ /dev/null
    @@ -1,6 +0,0 @@
    -{
    -    "name": "drupal/adobeanalytics",
    -    "description": "Adds Adobe Analytics javascript tracking code to your site's pages.",
    -    "type": "drupal-module",
    -    "license": "GPL-2.0+"
    -}
    

    There's no harm in having a composer.json, if anything I'd advise it.

  3. +++ b/src/Form/AdobeanalyticsAdminSettings.php
    @@ -80,8 +80,8 @@ class AdobeanalyticsAdminSettings extends ConfigFormBase {
    +    $default_value = ($config->get("role_tracking_type")) ? $config->get("role_tracking_type") : 'inclusive';
    

    I'm not sure this needs the extra brackets.

  4. +++ b/src/Form/AdobeanalyticsAdminSettings.php
    @@ -91,17 +91,17 @@ class AdobeanalyticsAdminSettings extends ConfigFormBase {
    +      '#default_value' => empty($config_track_roles) ?
    +        array_keys($roles) : $config->get('track_roles'),
    

    This might be easier to read as a single line.

kmoll’s picture

StatusFileSize
new16.68 KB
new3.18 KB

I have made a few small updates. In removing the `adobeanalytics` namespace from some of the form variables, it was not removed from the function to add the variable inputs, so it was not putting the variables in the table, and not saving the variables in the submit function.

I updated the patch and am committing. There is still an issue with the functionality of the variables form, but that is outlined in the issue #2831122: Add variable section of form does not work and should be updated shortly.

committing the updates. Thanks!

kmoll’s picture

Status: Needs work » Fixed
panshulk’s picture

Thanks all for reporting this and picking this up :)

naveenvalecha’s picture

#10.2
There's not any hard requirement on d.org to add the composer.json in the module. If the module has hard dependency on any external library then add it unless its not needed. It's a small improvement so nothing blocker of either adding/removing it.
Edit: As per latest changes. it's fine to keep it. I have not checked them yet https://www.drupal.org/node/2840512
#10.1
+1

I'll review it tonight and I believe in the meanwhile this issue #2831122: Add variable section of form does not work will also gets fixed.

// Naveen

Status: Fixed » Closed (fixed)

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