-
Author
Tagged: SQUEEN_OPTIONS_URL, WP_CONTENT_DIR, WP_CONTENT_URL
-
June 28, 2014 at 19:24 #21212stParticipant
Starting in WordPress 2.6 you are able to move your wp-content directory by specifying the following in wp-config.php:
define(‘WP_CONTENT_DIR’, ‘/var/domain/wp-content’);
define(‘WP_CONTENT_URL’, ‘http://cdn.domain.com/wp-content’);http://codex.wordpress.org/Editing_wp-config.php#Moving_wp-content_folder
In sweetdate/framework/options/default.php you are calculating SQUEEN_OPTIONS_URL on line 17:
define('SQUEEN_OPTIONS_URL', site_url(str_replace($fslashed_abs, '', $fslashed_dir)));
This is failing because WP_CONTENT_DIR and WP_CONTENT_URL are set. I think it should be updated to something like this:
define('SQUEEN_OPTIONS_URL', get_bloginfo('template_directory') . '/framework/options/');
Everything works again except the FontAwesome icons work in Safari but not Firefox. Any thoughts?
June 30, 2014 at 01:35 #21239stParticipantThe icons are working in Chrome and Safari but not in Firefox or Internet Explorer.
June 30, 2014 at 18:05 #21295stParticipantI was able to fix the Font Awesome issue by loading it from the CDN instead:
COPY CODEwp_deregister_style('font-awesome'); wp_enqueue_style('font-awesome-cdn', '//maxcdn.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css');
I still think it would be wise to apply the changes from the original post to the theme so it will support WP_CONTENT_DIR and WP_CONTENT_URL.
June 30, 2014 at 20:12 #21299AbeKeymasterHi @st
try replacing that declaration with this: define( ‘SQUEEN_OPTIONS_URL’, get_template_directory_uri() . ‘/framework/options’ );If it works in other browser the the link should be fine but give it a shot
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.June 30, 2014 at 20:25 #21305stParticipantdefine('SQUEEN_OPTIONS_URL', get_template_directory_uri() . '/framework/options/');
has the same output as
define('SQUEEN_OPTIONS_URL', get_bloginfo('template_directory') . '/framework/options/');
so it works but the FontAwesome icons do not appear in Internet Explorer or FireFox. I am using this as a temporary workaround:
COPY CODEwp_deregister_style('font-awesome'); wp_enqueue_style('font-awesome-cdn', '//maxcdn.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css');
June 30, 2014 at 21:49 #21310AbeKeymasterStrange that it does not appear in IE or FF. Could be something related to site url. Yes I know the above give the same output but my version is recommended.
What is your site name. try to leave it with the error and give me the url to the site to take a quick lookHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.June 30, 2014 at 21:51 #21312AbeKeymasterPut it here and mark the reply as private so only I will see it
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.June 30, 2014 at 22:03 #21321AbeKeymasterI just found the problem. See this notice:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://cdn.site.com/wp-content/themes/sweetdate/assets/font/fontawesome-webfont.woff?v=3.2.1. This can be fixed by moving the resource to the same domain or enabling CORS.It is related to your CDN settings and the browser does not want to load the js from http://cdn.site.com since your domain is http://community.site.com/
I guess your fix should do
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.June 30, 2014 at 23:30 #21331stParticipantIt turns out the FontAwesome bug was related to my .htaccess settings and is working now without having to use the CDN.
However, I’ve since enabled warnings and am seeing this:
Warning: copy(/var/community.domain.com//wp-content/plugins/bp-custom.php): failed to open stream: No such file or directory in /var/cdn.domain.com/wp-content/themes/sweetdate/custom_buddypress/bp-functions.php on line 1025
July 1, 2014 at 00:27 #21336AbeKeymasterYou don’t have write permissions on your server at that location /wp-content/plugins/
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.July 1, 2014 at 00:31 #21337stParticipantShoot. Can you please edit the above post to domain.com?
I don’t think that is the problem. The server definitely has write permissions. The file does not exist at /var/community.domain.com//wp-content/plugins/bp-custom.php. Shouldn’t it be trying to copy the file from /var/cdn.domain.com//wp-content/plugins/bp-custom.php?
July 1, 2014 at 01:36 #21351AbeKeymastercopy it by hand then to your ftp server since your cdn plugin messes things up
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.July 1, 2014 at 02:08 #21356stParticipantThis is not a result of a plug-in. WordPress 2.6 supports moving the wp-content directory by specifying WP_CONTENT_DIR and WP_CONTENT_URL. This functionality is included in the WordPress core and mentioned in the WordPress codex. I assume that you’d like your theme to support this core functionality. I have already tested this for you and have provided the code below. I hope that you are able to include these updates in the next version of the theme.
sweetdate/framework/options/default.php line 17:
define('SQUEEN_OPTIONS_URL', get_template_directory_uri() . '/framework/options/');
sweetdate/custom_buddypress/bp-functions.php line 1025:
if (copy(FRAMEWORK_URL."/inc/bp-custom.php", WP_PLUGIN_DIR."/bp-custom.php"))
July 1, 2014 at 15:38 #21401AbeKeymasterWE will make those changes in next updates sure
ThanksHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer. -
AuthorPosts
The forum ‘Sweetdate – WordPress’ is closed to new topics and replies.