GithubHelp home page GithubHelp logo

cloudflare / cloudflare-magento Goto Github PK

View Code? Open in Web Editor NEW
49.0 20.0 17.0 3.79 MB

A Cloudflare plugin for Magento2.

Home Page: https://www.cloudflare.com/integrations/magento/

License: BSD 3-Clause "New" or "Revised" License

PHP 70.94% HTML 1.49% JavaScript 18.41% CSS 9.16%

cloudflare-magento's Introduction

Notice: This plugin has been deprecated and is no longer officially supported by Cloudflare.

For information regarding using Magento & Cloudflare, please see this support article.

Build Status

Installing the Cloudflare Magento2 extension

From the magento2 root directory run the following commands:

  1. composer require cloudflare/cloudflare-magento
  2. composer update
  3. bin/magento setup:upgrade
  4. bin/magento setup:di:compile

Versions of Magento2 supported

  • Up to Magento2 CE 2.2.0

Development

You'll need to get authorization keys from the Magento marketplace and make an auth.json:

{
    "http-basic": {
        "repo.magento.com": {
            "username": "[MAGENTO USERNAME]",
            "password": "[MAGENTO PASSWORD]"
        }
    }
}

This will allow composer install to authenticate against repo.magento.com/.

Development Commands

  1. composer test
  2. composer lint
  3. composer format

Tests

vendor/phpunit/phpunit/phpunit -c dev/tests/unit/phpunit.xml.dist vendor/cloudflare/cloudflare-magento/Test/Unit/

cloudflare-magento's People

Contributors

garrettgalow avatar icyapril avatar jwineman avatar manatarms avatar thellimist avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cloudflare-magento's Issues

Manual install without using composer?

I want to install this plugin manually

  1. What is the folder name where I need to upload files?

  2. Is this the correct command to enable it?

bin/magento module:enable cloudflare-magento
bin/magento setup:upgrade

Thanks

Empty page at System -> Cloudflare

I installed the module, but cannot configure it.

When I go to System -> Cloudflare I see the title, but the rest of the page isn't being loaded.

I'm running Magento 2.2.11

Cannot instantiate interface CF\Integration\ConfigInterface

[11-Apr-2018 13:58:00 UTC] PHP Fatal error:  Uncaught Error: Cannot instantiate interface CF\Integration\ConfigInterface in /var/www/magento2/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:111
Stack trace:
#0 /var/www/magento2/vendor/magento/framework/ObjectManager/Factory/Compiled.php(108): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('CF\\Integration\\...', Array)
#1 /var/www/magento2/vendor/magento/framework/ObjectManager/Factory/Compiled.php(150): Magento\Framework\ObjectManager\Factory\Compiled->create('CF\\Integration\\...')
#2 /var/www/magento2/vendor/magento/framework/ObjectManager/Factory/Compiled.php(79): Magento\Framework\ObjectManager\Factory\Compiled->get('CF\\Integration\\...')
#3 /var/www/magento2/vendor/magento/framework/ObjectManager/Factory/Compiled.php(150): Magento\Framework\ObjectManager\Factory\Compiled->create('CloudFlare\\Plug...')
#4 /var/www/magento2/vendor/magento/framework/ObjectManager/Factory/Compiled.php(79): Mage in /var/www/magento2/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 111

Plugin v1.1.7
Magento v2.2.3

It's a clean install on a freshly configured CentOS 7.4 box with no other plugins or customisation (although I have disabled a number of the default plugins as follows; Magento_Weee Magento_Fedex Magento_Analytics Magento_Marketplace Magento_Signifyd Magento_Usps Magento_Braintree Magento_Dhl Dotdigitalgroup_Email Shopial_Facebook Temando_Shipping Magento_Ups Magento_SampleData Magento_Swagger Magento_Authorizenet).

Disabling the plugin causes the site to run fine again instantly.

After Install Got error On website

Hello ,
After install got error on website.

Fatal error: Interface 'CF\Integration\IntegrationAPIInterface' not found in /var/www/magento2/products/app/code/CloudFlare/Plugin/Backend/MagentoAPI.php on line 12

Can you please look once.

Setup:Upgrade will not run

After requiring the module into composer, I get an issue with the php bin/magento setup:upgrade command which causes this error;

[Zend_Db_Statement_Exception]
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'myapp.cloudflare_data
' doesn't exist, query was: SELECT cloudflare_data.* FROM cloudflare_data WHERE
(cloudflare_data.key='zoneId:myapp.local')

It looks like it's trying to select a key from the database before it's even installed.

I'm running this locally on an ubuntu VM.

Cloudflare plugin + Varnish + Redis?

It is more a question than an issue.

Does anyone has has experience on how this Cloudflare plugin geting along with Varnish and Redis on Magento 2. Thank You!

Upgraded Magento to 2.3.5

Clearing Magento cache results in the following error:-

Exception #0 (Zend_Uri_Exception): "Zend_Uri_Http" not found
<pre>#1 Zend_Http_Client->setUri() called at [vendor/cloudflare/cloudflare-magento/Backend/MagentoHttpClient.php:49]

I suspect due to change of Zend library name?

Magento CE 2.2.4?

When will this work with Magento CE 2.2.4?
Failing in my testing.
Thanks!

Cannot install Magento 2.1.4 with plugin enabled

With the cloudflare magento plugin required, a fresh installation of Magento 2.1.4 fails.

Error message: (vagrant/puppet encoded)

==> default: Notice: /Stage[main]/Magento/Exec[Install Magento]/returns: Running schema recurring...PHP Fatal error:  Uncaught Error: Cannot instantiate interface CF\Integration\IntegrationInterface in /var/www/Magento/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:73
==> default: Notice: /Stage[main]/Magento/Exec[Install Magento]/returns: Stack trace:
==> default: Notice: /Stage[main]/Magento/Exec[Install Magento]/returns: #0 /var/www/Magento/vendor/magento/framework/ObjectManager/ObjectManager.php(71): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('CF\\Integration\\...')
==> default: Notice: /Stage[main]/Magento/Exec[Install Magento]/returns: #1 /var/www/Magento/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(126): Magento\Framework\ObjectManager\ObjectManager->get('CF\\Integration\\...')
==> default: Notice: /Stage[main]/Magento/Exec[Install Magento]/returns: #2 /var/www/Magento/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(53): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(Array, 'CF\\Integration\\...', NULL, 'integration', 'CloudFlare\\Plug...')
==> default: Notice: /Stage[main]/Magento/Exec[Install Magento]/returns: #3 /var/www/Magento/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(82): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments('CloudFlare\\Plug...', Array, Array)
==> default: Notice: /Stage[main]/Magento/Exec[Install Magento]/returns: #4 /var/www/Magento/vendor/magento/framework/Obj in /var/www/Magento/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php on line 73

Error when installing via `setup:upgrade` on an existing environment

Forewarning: I don't have perfect recreation steps, but wanted to go ahead and let you know what's going on.

My colleague got one of these when he was running setup:upgrade after pulling down my code with the module installed:

  SQLSTATE[42S02]: Base table or view not found: 1146 Table 'magento.cloudfla
  re_data' doesn't exist, query was: SELECT `cloudflare_data`.* FROM `cloudfl
  are_data` WHERE (`cloudflare_data`.`key`='zoneId:local-dev.sdbullion.com/ma
  gento')

  [PDOException]
  SQLSTATE[42S02]: Base table or view not found: 1146 Table 'magento.cloudfla
  re_data' doesn't exist

Attached a debugger to Zend_Exception to find the stack trace, and it's being triggered because part of the setup:upgrade process is re-organizing app/etc/config.php. Our problem then is that (like good developers) we keep app/etc/config.php in version control - so CloudFlare was already enabled and when it came time to clear the cache it failed.

I realize this might be an edge-case. We easily worked around it by running the individual schema and data upgrade scripts.

Either way, I wanted to at least document it here.

error in magento 2.2.8

Fatal error: Interface 'CF\Integration\IntegrationAPIInterface' not found in /ho me/lb4sale/public_html/app/code/CloudFlare/Plugin/Backend/MagentoAPI.php on line 12

Error after compile on production mode

Fatal error: Uncaught TypeError: Argument 1 passed to CF\Integration\DefaultIntegration::__construct() must be an instance of CF\Integration\ConfigInterface, instance of Magento\Framework\ObjectManager\ObjectManager given, called in /var/www/clients/client0/web1/web/lib/internal/Magento/Framework/ObjectManager/Factory/AbstractFactory.php on line 93 and defined in /var/www/clients/client0/web1/web/vendor/cloudflare/cloudflare-plugin-backend/src/Integration/DefaultIntegration.php:20 Stack trace: #0 /var/www/clients/client0/web1/web/lib/internal/Magento/Framework/ObjectManager/Factory/AbstractFactory.php(93): CF\Integration\DefaultIntegration->__construct(Object(Magento\Framework\ObjectManager\ObjectManager)) #1 /var/www/clients/client0/web1/web/lib/internal/Magento/Framework/ObjectManager/Factory/Compiled.php(88): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('CF\Integration\...', Array) #2 /var/www/clients/client0/web1/web/lib/internal/Magento/Framework/ObjectManager/Factory/Compiled.php(130): Mag in /var/www/clients/client0/web1/web/vendor/cloudflare/cloudflare-plugin-backend/src/Integration/DefaultIntegration.php on line 20

magento CE 2.3

Hi,
when I switch to production mode, I have 500 error:
PHP Fatal error: Uncaught Error: Cannot instantiate interface CF\Integration\ConfigInterface in /home/tdsbaruy/public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:116
Stack trace:
#0 /home/tdsbaruy/public_html/vendor/magento/framework/ObjectManager/Factory/Compiled.php(108): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('CF\Integration\...', Array)
#1 /home/tdsbaruy/public_html/vendor/magento/framework/ObjectManager/Factory/Compiled.php(150): Magento\Framework\ObjectManager\Factory\Compiled->create('CF\Integration\...')
#2 /home/tdsbaruy/public_html/vendor/magento/framework/ObjectManager/Factory/Compiled.php(79): Magento\Framework\ObjectManager\Factory\Compiled->get('CF\Integration\...')
#3 /home/tdsbaruy/public_html/vendor/magento/framework/ObjectManager/Factory/Compiled.php(150): Magento\Framework\ObjectManager\Factory\Compiled->create('CloudFlare\Plug...')
#4 /home/tdsbaruy/public_html/vendor/magento/framework/ObjectManager/Factory/Compiled.php(79): Magento\Framewor in /home/tdsbaruy/public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 116
[07-Dec-2018 20:54:16 UTC] PHP Fatal error: Uncaught Error: Cannot instantiate interface CF\Integration\ConfigInterface in /home/tdsbaruy/public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:116

Cloudflare configuration page Blank

Hello,

I added the cloudflare magento 2 plugin to my magento store.
It is running magento 2.1.6 and the cloudflare plugin is also running the latest version (just updated it using composer)

When I visit the configuration page the page is blank. Looking at the console in chrome I get this error:

compiled.min.js:13 Uncaught ReferenceError: ε is not defined
at compiled.min.js:13
at Object. (compiled.min.js:13)
at webpack_require (compiled.min.js:1)
at compiled.min.js:18
at Object. (compiled.min.js:18)
at webpack_require (compiled.min.js:1)
at Object. (compiled.min.js:13)
at webpack_require (compiled.min.js:1)
at Object. (compiled.min.js:18)
at webpack_require (compiled.min.js:1)

Thanks in Advance!
Erik

Enabling CloudFlare

On Magento 2.2.4, Nginx, trying to install 1.1.8.

It hangs on the web setup wizard with the console log empty but the status request responds with:

{statusMessage: "", isUpdateInProgress: false, complete: false, error: false, pending: true}
complete: false
error: false
isUpdateInProgress: false
pending: true
statusMessage: ""

I've tried to get this module going for a while with issue after issue and this is where I'm at.

Any help would be greatly appreciated. Thanks.

Unable to install on Magento 2.1.2 through composer

Using version ^1.0 for cloudflare/cloudflare-magento
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - cloudflare/cloudflare-magento 1.0.8 requires cloudflare/cloudflare-plugin-backend 1.1.7 -> satisfiable by cloudflare/cloudflare-plugin-backend[1.1.7].
    - cloudflare/cloudflare-magento 1.0.9 requires cloudflare/cloudflare-plugin-backend 1.1.7 -> satisfiable by cloudflare/cloudflare-plugin-backend[1.1.7].
    - Conclusion: don't install cloudflare/cloudflare-plugin-backend 1.1.7
    - cloudflare/cloudflare-magento 1.0.7 requires cloudflare/cloudflare-plugin-backend 1.1.3 -> satisfiable by cloudflare/cloudflare-plugin-backend[1.1.3].
    - Conclusion: don't install cloudflare/cloudflare-plugin-backend 1.1.3
    - cloudflare/cloudflare-magento 1.0.6 requires cloudflare/cloudflare-plugin-backend 1.1.1 -> satisfiable by cloudflare/cloudflare-plugin-backend[1.1.1].
    - Conclusion: don't install cloudflare/cloudflare-plugin-backend 1.1.1
    - cloudflare/cloudflare-magento 1.0.4 requires cloudflare/cloudflare-plugin-backend 1.0.4 -> satisfiable by cloudflare/cloudflare-plugin-backend[1.0.4].
    - cloudflare/cloudflare-magento 1.0.5 requires cloudflare/cloudflare-plugin-backend 1.0.4 -> satisfiable by cloudflare/cloudflare-plugin-backend[1.0.4].
    - Conclusion: don't install cloudflare/cloudflare-plugin-backend 1.0.4
    - Conclusion: don't install cloudflare/cloudflare-magento 1.0.3
    - cloudflare/cloudflare-magento 1.0.0 requires cloudflare/cloudflare-plugin-backend 1.0.1 -> satisfiable by cloudflare/cloudflare-plugin-backend[1.0.1].
    - Conclusion: remove guzzlehttp/guzzle 6.2.2
    - Installation request for cloudflare/cloudflare-magento ^1.0 -> satisfiable by cloudflare/cloudflare-magento[1.0.0, 1.0.3, 1.0.4, 1.0.5, 1.0.6, 1.0.7, 1.0.8, 1.0.9].
    - Conclusion: don't install guzzlehttp/guzzle 6.2.2
    - cloudflare/cloudflare-plugin-backend 1.0.1 requires guzzlehttp/guzzle ~5.0 -> satisfiable by guzzlehttp/guzzle[5.0.0, 5.0.1, 5.0.2, 5.0.3, 5.1.0, 5.2.0, 5.3.0, 5.3.1].
    - Can only install one of: guzzlehttp/guzzle[5.0.0, 6.2.2].
    - Can only install one of: guzzlehttp/guzzle[5.0.1, 6.2.2].
    - Can only install one of: guzzlehttp/guzzle[5.0.2, 6.2.2].
    - Can only install one of: guzzlehttp/guzzle[5.0.3, 6.2.2].
    - Can only install one of: guzzlehttp/guzzle[5.1.0, 6.2.2].
    - Can only install one of: guzzlehttp/guzzle[5.2.0, 6.2.2].
    - Can only install one of: guzzlehttp/guzzle[5.3.0, 6.2.2].
    - Can only install one of: guzzlehttp/guzzle[5.3.1, 6.2.2].
    - Installation request for guzzlehttp/guzzle (locked at 6.2.2) -> satisfiable by guzzlehttp/guzzle[6.2.2].


Installation failed, reverting ./composer.json to its original content.```

Issue with cloudflare Plugin

Hi,
I got this issue when I activated CloudflarePlugin (in below).
2016/11/05 13:23:54 [error] 5143#5143: *21 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught TypeError: Argument 1 passed to CF\Integration\DefaultIntegration::__construct() must implement interface CF\Integration\ConfigInterface, instance of Magento\Framework\ObjectManager\ObjectManager given, called in vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 93 and defined in vendor/cloudflare/cloudflare-plugin-backend/src/Integration/DefaultIntegration.php:20
Stack trace:
#0 vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(93): CF\Integration\DefaultIntegration->__construct(Object(Magento\Framework\ObjectManager\ObjectManager))
#1 vendor/magento/framework/ObjectManager/Factory/Compiled.php(88): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('CF\Integration\...', Array)
#2 vendor/magento/framework/ObjectManager/Factory/Compiled.php(130): Magento\Framewo" while reading response header from upstream

I followed the steps given to install the module but nothing changed:
From the magento2 root directory run the following commands:
composer require cloudflare/cloudflare-magento
composer update
bin/magento setup:upgrade
bin/magento setup:di:compile

Thanks in advance

Support php 7.1

When I tried to install module via composer, I got this error:
Could not find package cloudflare/cloudflare-magento at any version matching your PHP version 7.1.12.0

Cloudflare config page empty

I just installed the plugin on a Magento 2.2.6 website.

When I want to go to the config page of the plugin in the backend, I.m getting an empty page.

Cannot instantiate ConfigInterface

Preconditions

  1. Cloudflare-Magento v1.1.6
  2. Magento v2.1.4 (production mode)
  3. PHP v7.0.22

Related issues

#34
#38
#39

Summary

When running our deployment the following error is generated after running di:compile and static-content:deploy

17:57:38 magento stderr: PHP Fatal error:  Uncaught Error: Cannot instantiate interface CF\Integration\ConfigInterface in deployment_acc/releases/20170829154850/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:93
17:57:38 Stack trace:
17:57:38 #0 deployment_acc/releases/20170829154850/vendor/magento/framework/ObjectManager/Factory/Compiled.php(88): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('CF\\Integration\\...', Array)
17:57:38 #1 deployment_acc/releases/20170829154850/vendor/magento/framework/ObjectManager/Factory/Compiled.php(130): Magento\Framework\ObjectManager\Factory\Compiled->create('CF\\Integration\\...')
17:57:38 #2 deployment_acc/releases/20170829154850/vendor/magento/framework/ObjectManager/Factory/Compiled.php(67): Magento\Framework\ObjectManager\Factory\Compiled->get('CF\\Integration\\...')
17:57:38 #3 deployment_acc/releases/20170829154850/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 93

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.