Events Made Easy › Forums › Bug fixed or feature request implemented › EME_PLUGIN_URL breaks secure backends
Tagged: FORCE_SSL_ADMIN, https, plugin_url, ssl, WP_PLUGIN_URL
- This topic has 15 replies, 3 voices, and was last updated 13 years, 11 months ago by Anonymous.
-
AuthorPosts
-
Tue 9 Nov 2010 at 23:52 #42222AnonymousInactive
Fantastic to see this great plugin being maintained. One small request:
in v3.2.7, can line 34 of events-manager.php please be changed to
define('EME_PLUGIN_URL', plugins_url('', __FILE__) . '/');
…otherwise users get a “Load only secure content?” pop-up on every screen of the backend on sites where FORCE_SSL_ADMIN has been set to true in wp-config.php. Apparently, we should all stop using WP_PLUGIN_URL etirely due to the fact that it breaks secure admins.
Thanks! Hope this is helpful.
Wed 10 Nov 2010 at 07:30 #45327FrankyKeymasterThanks for the heads-up. Has been changed in the trunk version!
Wed 10 Nov 2010 at 16:17 #45328AnonymousInactiveExcellent – thanks for being so responsive!
Sun 19 Dec 2010 at 07:32 #45329AnonymousInactiveI made the changes above to fix the same issue but I am now getting the following fatal error:
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in domain.org/html/wp-content/plugins/events-manager-extended/events-manager.php on line 1010
Sun 19 Dec 2010 at 07:42 #45330AnonymousInactiveAttempt 2: So making the change via FTP did not result in the error but I am still getting the SSL warnings.
Sun 19 Dec 2010 at 08:40 #45331FrankyKeymasterWell, try to use the latest version, the change is already in there.
Sun 19 Dec 2010 at 08:48 #45332AnonymousInactiveI’m currently running Version 3.2.12. I see it listed as the newest stable release.
Sun 19 Dec 2010 at 09:53 #45333FrankyKeymasterWell, this is in there:
define('EME_PLUGIN_URL', plugins_url('',plugin_basename(__FILE__)).'/');
and should be ok …
Sun 19 Dec 2010 at 10:03 #45334AnonymousInactiveThis is from the zip file I just downloaded off this site.
<?php
/*
Plugin Name: Events Manager Extended
Version: 3.2.12
Plugin URI: http://www.e-dynamics.be/wordpress
Description: Manage events specifying precise spatial data (Location, Town, etc).
Author: Franky Van Liedekerke
Author URI: http://www.e-dynamics.be/
*/
/*
Copyright (c) 2009, Davide Benini. $Revision: 1 $
Copyright (c) 2010, Franky Van Liedekerke.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
/*************************************************/
// Setting constants
define(‘EME_DB_VERSION’, 11);
define(‘EME_PLUGIN_URL’, plugins_url(”,plugin_basename(__FILE__)).’/’); //PLUGIN DIRECTORY
define(‘EME_PLUGIN_DIR’, ABSPATH.PLUGINDIR.’/’.str_replace(basename( __FILE__),””,plugin_basename(__FILE__))); //PLUGIN DIRECTORY
define(‘EVENTS_TBNAME’,’dbem_events’); //TABLE NAME
define(‘RECURRENCE_TBNAME’,’dbem_recurrence’); //TABLE NAME
define(‘LOCATIONS_TBNAME’,’dbem_locations’); //TABLE NAME
define(‘BOOKINGS_TBNAME’,’dbem_bookings’); //TABLE NAME
define(‘PEOPLE_TBNAME’,’dbem_people’); //TABLE NAME
Sun 19 Dec 2010 at 16:38 #45335FrankyKeymasteryes??? It’s there:
define('EME_PLUGIN_URL', plugins_url('',plugin_basename(__FILE__)).'/'); //PLUGIN DIRECTORY
Sun 19 Dec 2010 at 18:34 #45336AnonymousInactiveI don’t know much about PHP but these two lines are not identical. Either way the fix listed in this post is not working and I would like to be able to turn map integration on again.
define(‘EME_PLUGIN_URL’, plugins_url(”, __FILE__) . ‘/’); Line in post
define(‘EME_PLUGIN_URL’, plugins_url(”,plugin_basename(__FILE__)).’/’); Line in file
Here are the console errors google chrome logs when I have map integration enabled.
The page at https://www.simpletruthfoundation.org/about-us/support ran insecure content from http://maps.google.com/maps/api/js?v=3.1&sensor=false&callback=loadGMap.
The page at https://www.simpletruthfoundation.org/about-us/support ran insecure content from http://maps.gstatic.com/intl/en_us/mapfiles/api-3/1/14/main.js.
The page at https://www.simpletruthfoundation.org/about-us/support ran insecure content from http://maps.gstatic.com/cat_js/intl/en_us/mapfiles/api-3/1/14/%7Bcommon,util%7D.js.
The page at https://www.simpletruthfoundation.org/about-us/support ran insecure content from http://maps.googleapis.com/maps/api/js/AuthenticationService.Authenticate?1shttps%3A%2F%2Fwww.simpletruthfoundation.org%2Fabout-us%2Fsupport&callback=_xdc_._6xsqn6&token=55824.
Sun 19 Dec 2010 at 18:55 #45337FrankyKeymasterThe lines are not identical, the version given in the released files is better.
The problem here is that this is related to the google map service, not your own URL’s. The site at maps.google.com can’t be used over ssl (https), so I can’t change that fact. If you want https for google maps, you have to pay google for it: http://code.google.com/apis/maps/faq.html#ssl
Sun 19 Dec 2010 at 19:03 #45338AnonymousInactiveThanks I had already looked into that and it’s a minimum of fee $10,000. Not even remotely worth the cost. My thought was why is this code called on every page of the site when in reality it on needs to be executed on just a few pages which I have no need to force SSL on. Since I can see this plugin being used to manage and integrate with an e-commerce system to sell tickets to events, getting it to work on a site that has SSL on some pages could really be beneficial.
Sun 19 Dec 2010 at 20:50 #45339FrankyKeymasterWell … I’ll try putting the javascript in the body of the page, if that works I can load it only when needed, otherwise maybe I can add an option so you can define on which pages you want the google maps api to be loaded, I see no other way around it …
Tue 21 Dec 2010 at 15:38 #45340FrankyKeymasterI’ve committed some code to svn trunk that should resolve this, as in the changelog:
“the google map javascript code will now only get loaded if/when needed at the bottom of pages, and no longer always at the top”
The diff: http://plugins.trac.wordpress.org/changeset/324983/events-manager-extended/trunk
Tue 21 Dec 2010 at 19:12 #45341AnonymousInactiveThinks for making those improvements. I tested it out on my clients site and everything is working great.
-
AuthorPosts
- The forum ‘Bug fixed or feature request implemented’ is closed to new topics and replies.