bczegeny
Forum Replies Created
-
Checked in my database and the path points to the s3 bucket but the guid is still set to the server path. Very odd the path on the bucket does not reflect the same path in the uploads I think that may have something to do with /uploads/2015/04/28032252/IMG_7584.jpg
vs what was in the guid /uploads/2015/04/IMG_7584.jpgMight be ewww image optimization plugin that made a revision of the image before the media was moved to the s3 bucket. Still doesn’t explain why the File URL in the media library points to the s3 bucket but the guid in the DB pointed to the server.
I updated the db manually and it’s showing now
hmm I tried commenting out
if ( ! isset( $parsed_url[1] ) || empty( $parsed_url[1] ) || ( $this_host != $file_host ) ) {
and replacing it with
if ( ! isset( $parsed_url[1] ) || empty( $parsed_url[1] ) ) {
But no such luck I have ran a query on my db
SELECT ID FROMwp1_posts
WHERE guid RLIKE ‘%s;”,/uploads/2015/04/28032252/IMG_7584.jpg’;and it produces no result very odd that it’s in the database
this is what image paths look like using the s3 bucket
https://momentsafterdark.s3-us-west-2.amazonaws.com/wp-content/uploads/2015/04/28032252/IMG_7584.jpg
They are still linked in the wordpress media galley and can be attached to a post see https://www.momentsafterdark.ca/?attachment_id=1259
I think this is why ct_tracks_get_image() isnt working is because the s3 bucket url doesn’t match the host url of the site
Any idea’s on how I can hack this to work with the subdomain
I have never edited that function. I have not been using a child theme (I know I should) I’ll get around to setting that up soon. I have modified other core theme functions but very minor tweaks.
I would assume the function is being called because my profile picture shows up. But when you inspect the code for the post with no image showing up It just doesn’t write the image tag for users with a permission below Administrator?
The code for ct_tracks_profile_image_output() is this:
function ct_tracks_profile_image_output(){ // use User's profile image, else default to their Gravatar if(get_the_author_meta('user_profile_image')){ // get the id based on the image's URL $image_id = ct_tracks_get_image_id(get_the_author_meta('user_profile_image')); // retrieve the thumbnail size of profile image $image_thumb = wp_get_attachment_image($image_id, 'thumbnail'); // display the image echo $image_thumb; } else { echo get_avatar( get_the_author_meta( 'ID' ), 72 ); } }
Ok so with a little debugging I figured out what is happening. I use cloudfront and aws s3 to store my media. When you upload photos to the site they are automatically pushed to an s3 bucket. My user profile was created before I set this up and that image for whatever reason has not been migrated to the s3 bucket.
$image_thumb = wp_get_attachment_image($image_id, 'thumbnail');
is what is not working. I’m pretty sure due to the images being hosted externally wp_get_attachement_image will not work.Any thoughts on how to modify this it still pulls in the url of the image I added `
..`
$image_thumb = wp_get_attachment_image($image_id, ‘thumbnail’);
print_r(get_the_author_meta(‘user_profile_image’));
..` to see if there was actually a photo attached to the user profile and it indeed returns the full url path to the image. Which is why the default gravitar image was not being display.I think there is an error in how ct_tracks_get_image_id(); works because there is nothing displayed when I do print_r($image_id); for the affected posts.
Forum: Themes and Templates
In reply to: [Tracks] Icon's are gone?Gonna leave this here incase someone else has a similar issue with font awesome and CDN’s
Put this in your .htaccess file
<FilesMatch "\.(ttf|otf|eot|woff)$"> <IfModule mod_headers.c> Header set Access-Control-Allow-Origin "*" </IfModule> </FilesMatch>
Forum: Themes and Templates
In reply to: [Tracks] Icon's are gone?Cloudfront is a CDN I use. I did move servers over a week ago not sure why the problem showed up now. I used cloudfront on my old server too. Kinda scratching my head on how to stop the CDN from trying to service up this specific file. I guess I could enable cross site content loading at the server level.
I appreciate the help even though this isn’t theme related. I thought upgrading wordpress was the issue.
Cheers,
well I figured it out. I ungrouped the .home .archive and used two separate lines with the same styling but targeted more specifically and it did the trick
.home.blog.full-width
.archive.full-widthYour customer service is amazing! However doing that breaks the post list I have made your change look at the home page now
By doing that the .full-width .featured-image {} css now takes president over the category-event-galleries defined css for featured-image
I’m not sure but it seems like .home .achieve, grouping inside the media query has no effect anymore. Same goes for the .singular-post ?
Your customer service is amazing!
I have debugged it a bit more the code inside the
@media all and (min-width: 56.250em) { .home .archive, .full-width .category-events-galleries .featured-image { height: 100%; padding-bottom: 0; position: absolute; right: -1px; -webkit-transform: translateZ(0px); transform: translateZ(0px); width: calc(50% + 2px);} }
is overwriting
.singular-post .full-width .featured-image { position: relative; width: 100%; height: 0; padding-bottom: 50%; right: 0; }
I have tried to move that into the media query but it still has no effect.
Hey Ben,
Pesky Safari guess I will have to use a hard coded pixel size for the logo.
I am having trouble fixing the featured image. When I attach the Taxonomy to category-event-galleries it makes the featured images full width in the post list. Not sure If I am putting it in the right place. I assumed I would want to attach the Taxonomy to all my css targeted at making the posts of that taxinomy to display as the default theme in the post list not the full width. My css is as below
.category-events-galleries .entry-content { text-align: center;} .facebook-album-container { margin-left:5%;} .home .archive, .category-events-galleries article p:first-child { display:none; } .singular .singular-post .full-width .featured-image { position: relative; width: 100%; height: 0; padding-bottom: 50%; right: 0; } .vertical-align-wrap { position: relative; width: 100%; height: 100%; display: table; text-align:center; } .vertical-align { display: table-cell; } .vertical-align--middle { vertical-align: middle; } .excerpt-content { padding-bottom: 0px!Important; } .home .archive, .photocrati-nextgen_pro_slideshow { background-color: white; left:0; } @media all and (min-width: 56.250em) { .site-header .site-title { opacity: 1; filter: alpha(opacity=100);} .site-header { padding-bottom: 4px;} .singular-post .title-info { float: none!important; position: relative; text-align: center!important;} .home .site-title img { max-height: 50%!important; max-width: 50%!important;} .site-title img { max-height: 20%; max-width: 20%;} .singular-page .site-title .logo img { max-height: 20%!Important; max-width: 20%!Important;} .title-info { padding-top: 1%; text-align: center;} .menu-primary-items, .menu-unset { margin: 0 0 0 0;} .singular-post .menu-primary, menu.primary-tracks { min-height: 0px;} .archive .menu-primary-items { top: 28px; position: relative;} .toggled .site-title img { opacity: 0; filter: alpha(opacity=0);} .archive-header { padding: 0 0 4px 0;} #cboxTitle { visibility: hidden;} .home .archive, .full-width .category-events-galleries .excerpt.even .featured-image, .full-width .category-events-galleries .excerpt.even .featured-video { right: 0;} .home .archive, .full-width.taxonomy-category-events-galleries .featured-image { height: 100%; padding-bottom: 0; position: absolute; right: -1px; -webkit-transform: translateZ(0px); transform: translateZ(0px); width: calc(50% + 2px);} .home .archive, .full-width #main .category-events-galleries .excerpt-container { padding: 0 5.55%; width: 50%;} .home .archive, .full-width.full-post #main .category-events-galleries .excerpt-content { text-align: center; padding-bottom: 24px!Important;} .home .archive, .post.category-events-galleries .excerpt-container { min-height: 360px;}} @media all and (min-device-width : 20em) { .title-info { float: none!important;} .home .full-width, .site-title { text-align: center; clear: both; margin-top: 20px; margin-bottom: 20px;} .site-header .home .site-title img { text-align: center; max-width: 280px; max-height: 280px;} .site-header .site-title img { max-width: 200px; max-height: 200px;} .site-header .site-title { opacity: 1; filter: alpha(opacity=100);} .site-header.toggled .title-info { display: none;}}
I will keep the css live on my site with the changes above so you can see the effects.
Forum: Themes and Templates
In reply to: [Tracks] Mobile Logo Display sized too smallawesome thanks!
Forum: Themes and Templates
In reply to: [Tracks] Mobile Logo Display sized too smallHmm not sure what the undefined function is? I will have to look into that further. Ok I put in a pixel width and the logo is the right size but now not centered. Even though I have
.full-width .site-title { text-align: center; }
One other thing that is buggy is the way the logo doesn’t disapear when you use the mobile menu. Not sure what is messing with that
UPDATE: Ok got it to center but need the logo to not be displayed when they click the menu button.
Forum: Themes and Templates
In reply to: [Tracks] Category, Tags on the right side of post contentWhat if you want to place the tags below and the categories above the main content. Then have the main content full width of of the container
Forum: Themes and Templates
In reply to: [Tracks] Featured video or featured image slider?I’ll take a look at that slider. Will the slider work in the post list as well or do I need to modify more then just content.php Thinking of making a function to spit out the slider code?