Advertisement:

Author Topic: *NEW* FREE COOKIE CONSENT Plugin  (Read 13832 times)

gnoe

  • Full Member
  • ***
  • Posts: 237
Re: *NEW* FREE COOKIE CONSENT Plugin
« Reply #60 on: January 08, 2016, 11:54:57 pm »
Nginx & php-fpm here.
I have it disabled for now, till I figured out what's wrong and can't see Configure option.

SmaRTeY

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2519
Re: *NEW* FREE COOKIE CONSENT Plugin
« Reply #61 on: January 09, 2016, 08:41:54 pm »
Would be interesting to know how it works with Nginx if your server is not running php-fpm.
Reason for mentioning is that I had similar issue which was related to the php-fpm config in my apache VirtualServer's.

Nginx & php-fpm here.
I have it disabled for now, till I figured out what's wrong and can't see Configure option.

SmaRTeY

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2519
Re: *NEW* FREE COOKIE CONSENT Plugin
« Reply #62 on: January 09, 2016, 09:14:30 pm »
Hi dev101,

I do not recognize the error mentioned in (2), all mentioned issues should be fixed, do you use latest version from Market?

One possible issue you might run into IF your browser is not HTML5 compatible related to the ccp var is the missing text inside the script tag: type="text/javascript" (http://www.w3schools.com/tags/tag_script.asp)

For HTML5 that property is no longer needed but if your browser is not compatible with HTML5 it might raise an error?

I have made 2 mods in the latest version to make it compatible with some of my internal plugins and to fix one bug:

(1) increase z-index from 9001 to 1000000 (...000...)
(2) escape ccp var string (now it returns : error)

Configure link works just fine in my admin dash (also PHP-FPM) and I cannot see anything wrong in the plugin code in that regard.

Regards

dev101

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2132
  • osclass.work
Re: *NEW* FREE COOKIE CONSENT Plugin
« Reply #63 on: January 10, 2016, 02:21:04 am »
edit:

Sorry, I see that you have changed that line, it is possible that I used older version somehow where that string was not escaped.
« Last Edit: January 10, 2016, 03:40:34 am by dev101 »

SmaRTeY

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2519
Re: *NEW* FREE COOKIE CONSENT Plugin
« Reply #64 on: January 11, 2016, 02:44:19 am »
:)
That's okay.

@All, let me know if there's an issue with the plugin, I'll do my best to fix it again.

Regards,
Eric

gnoe

  • Full Member
  • ***
  • Posts: 237
Re: *NEW* FREE COOKIE CONSENT Plugin
« Reply #65 on: February 15, 2016, 10:57:53 am »
Had issues on a nginx/php-fpm box and couldn't see/use the Configure page.

The problem solved by adding osc_plugin_path() in 'cookie_consent_config' line (index.php).

Code: [Select]
//(Un)install hooks
osc_register_plugin(osc_plugin_path(__FILE__), 'cookie_consent_install');
osc_add_hook(osc_plugin_path(__FILE__) . '_uninstall', 'cookie_consent_uninstall');

//osc_add_hook(__FILE__ . '_configure', 'cookie_consent_config');
osc_add_hook(osc_plugin_path(__FILE__) . '_configure', 'cookie_consent_config');

//plugin hooks
osc_add_hook('before_html', 'load_ccs');
osc_add_hook('header','cookie_consent');

Regards.

SmaRTeY

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2519
Re: *NEW* FREE COOKIE CONSENT Plugin
« Reply #66 on: February 16, 2016, 12:59:37 am »
Hi gnoe,

that is a very interesting find, I am willing to put it into a new plugin version but I would like to know a bit more about this.
I had an issue myself with a missing 'config' link using VPS & Apache setup where the php-fpm 'config' on my server was the cause. Once I changed the php-fpm 'config' (different line of config, same result) the config link was showing again, very strange but it happened.

SO, I am wondering if there's a 'bug' by ommitting the 'osc_plugin_path' in the code of this hook or not (since I do not experience the issue with this plugin). Also I have other plugins in use that have the same 'config' code and all are showing the config link as expected.

@_CONEJO, if you are reading along (or anybody else with a more expert knowledge), any thoughts on this matter would be much obliged....

Thanks gnoe!


gnoe

  • Full Member
  • ***
  • Posts: 237
Re: *NEW* FREE COOKIE CONSENT Plugin
« Reply #67 on: February 16, 2016, 12:29:19 pm »
Hi SmaRTeY,
on some tests I did weeks ago, the plugin was working just fine.
These tests were performed on Apache. Both localhost and live site.
I don't remember the php mode(fastcgi,php-fmp).

I had issues with Configure page not showing, only on a Nginx/PHP-FPM setup with Cookie Consent plugin and lately with teseo's Pre-resize images new plugin.
Other plugins were OK.

After communicating with teseo, he provide me some new index.php files to try and the issue was solved.
Then, after some file comparing, I tried adding osc_plugin_path() to Cookie Consent Plugin's index.php to see if it works there too.
And it worked just fine.

I haven't touched PHP-FPM or Nginx config files.

Regards.
« Last Edit: February 18, 2016, 10:21:17 am by gnoe »

SmaRTeY

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2519
Re: *NEW* FREE COOKIE CONSENT Plugin
« Reply #68 on: February 17, 2016, 12:06:36 am »
Hi,

someone else was asking me support for a premium plugin having same issue and after he made the change you mentioned it worked for him as well. Same server setup NGINX with php-fpm so my conclusion here is that best practice now for plugins showing the config link in plugin overview page will best do so by adding the 'osc_plugin_path()' so NGINX setups will work OK. I tested with my VPS (Apache) and so far no behaviour changes by adding the 'osc_plugin_path()' so I will update my plugin(s) in the market with this fix!

Thanks again Gnoe/teseo

Hi SmaRTeY,
on some tests I did weeks ago, the plugin was working just fine.
These test were performed on Apache. Both localhost and live site.
I don't remember the php mode(fastcgi,php-fmp).

I had issues with Configure page not showing, only on a Nginx/PHP-FPM setup with Cookie Consent plugin and lately with teseo's Pre-resize images new plugin.
Other plugins were OK.

After communicating with teseo, he provide me some new index.php files to try and the issue was solved.
Then, after some file comparing, I tried adding osc_plugin_path() to Cookie Consent Plugin's index.php to see if it works there too.
And it worked just fine.

I haven't touched PHP-FPM or Nginx config files.

Regards.
« Last Edit: February 17, 2016, 12:28:20 am by SmaRTeY »

teseo

  • Hero Member
  • *****
  • Posts: 6169
Re: *NEW* FREE COOKIE CONSENT Plugin
« Reply #69 on: February 17, 2016, 12:34:38 am »
Hi SmaRTeY, :)

The thing is that I'm using Nginx with php-fpm and that never happened to me. ??? But whatever works... :D

Regards


SmaRTeY

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2519
Re: *NEW* FREE COOKIE CONSENT Plugin
« Reply #70 on: February 17, 2016, 01:07:29 am »
AAAARRRRRGGGGGGG ;)
I am willing to think that a certain NGINX setup is having issues with config link missing IF 'osc_plugin_path()' is missing in hook. I never tested my Apache missing config link issue with this but who knows. Also it looks as if adding 'osc_plugin_path()' makes more sense also looking at uninstall 'link' which is shown in same overview.
 
On the other hand, even though another NGINX setup or use of Apache does work, it does not seem to harm the config link IF the 'osc_plugin_path()' is added. Meaning in the end that adding the 'osc_plugin_path()' in config link hook is covering more 'ground' of succesfull config plugin links :)


Hi SmaRTeY, :)

The thing is that I'm using Nginx with php-fpm and that never happened to me. ??? But whatever works... :D

Regards

gnoe

  • Full Member
  • ***
  • Posts: 237
Re: *NEW* FREE COOKIE CONSENT Plugin
« Reply #71 on: February 17, 2016, 10:50:58 am »
To osc_plugin_path() or not to osc_plugin_path() ?
That is the question.  :D

At the end, what is the best programming practice?


Hi Teseo,
can you share you nginx directives for your osclass installation?
Since it's a path issue, maybe there is something different or missing there.
Mine is below.

Code: [Select]
location / {
   try_files $uri $uri/ /index.php?$args;
}

Regards.
« Last Edit: February 18, 2016, 09:27:51 am by gnoe »

teseo

  • Hero Member
  • *****
  • Posts: 6169
Re: *NEW* FREE COOKIE CONSENT Plugin
« Reply #72 on: February 17, 2016, 01:37:40 pm »
Code: [Select]
location / {
   try_files $uri $uri/ /index.php?$args;
}

Same here. Anyway, given the fact that there is a universal alternative that works, I won't spend more time looking for explanations...  ::)

Regards

SmaRTeY

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2519
Re: *NEW* FREE COOKIE CONSENT Plugin
« Reply #73 on: March 29, 2016, 12:11:50 am »
A new version is uploaded in the Market containing the fix Gnoe mentioned, it is under review and will soon be available for download.

Best regards,
Eric

deyan4

  • Newbie
  • *
  • Posts: 28
Re: *NEW* FREE COOKIE CONSENT Plugin
« Reply #74 on: September 21, 2016, 11:42:05 am »
Hello,

how can I change the message and the bottom text?

Thanks.