0

I am trying to edit one of the callbacks of the gdpr-cookie module in the directoy vendor/amasty/gdpr-cookie/view/frontend/web/js/cookies.js:

      allowCookies: function() {
            actionAllow().done(function() {

                //my code here

                $(this.barSelector).remove();
                cookieModel.triggerAllow();
            }.bind(this));
        },

But when I compile and build it:

bin/magento setup:di:compile
bin/magento setup:static-content:deploy

The un-edited file show up in the static folder (pub/static/frontend/.../Amasty_GdprCookie/js/cookies.js) . So the lines that I added are not there. I also clear the cache each time.

What am I doing wrong? Is the module being loaded from another directory? Where should I edit it?

2
  • It could be a write permission issue. You can check it easily - just remove all visible content from the pub/static/ (or just one file) and regenerate static content. Commented Sep 20, 2021 at 20:21
  • thanks. I will try it. Commented Sep 20, 2021 at 20:35

2 Answers 2

1

Try to run these command and then check.

php bin/magento cache:clean
php bin/magento cache:flush
php bin/magento indexer:reindex
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy -f
sudo chmod -R 777 var/ generated/ pub/
1
  • thanks. it worked. Commented Sep 26, 2021 at 8:48
1

Try 777 permission using the chmod command.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.