saltnpixels / ignition

The Starter Theme that Could
76 stars 13 forks source link

Fixed missing quotes from get_field string on line 264 #5

Closed ThatKDB closed 5 years ago

ThatKDB commented 5 years ago

Version 2.0 introduced an syntax error in the /inc/template-tags.php file on line 264

saltnpixels commented 5 years ago

Er... I dont think quotes are supposed to be around that. Thats code checking to see if no_image is selected. Did this give you an error. Can you tell me what the error was?

ThatKDB commented 5 years ago

l was getting a undefined PHP error for get_field after you had updated to 2.0 and the logo was not being output. After adding the quotes the error disappeared and the logo displayed as expected.

My PHP isn’t strong so I could be incorrect.

I can give you the exact error once I get back to work on Monday.

ThatKDB commented 5 years ago

Here are the errors I get when loading ignition 2.x. I'm using Local by Flywheel for my local dev, and I get the same error in all the Browsers I've tried: Chrome 72.0.3626.96 Firefox Developer Edition 66.0b6 Firefox 65.0 IE 11 I'm running WP 5.0.3

Fatal error: Uncaught Error: Call to undefined function get_field() in /app/public/wp-content/themes/ccpapress/inc/template-tags.php on line 264 Error: Call to undefined function get_field() in /app/public/wp-content/themes/ccpapress/inc/template-tags.php on line 264

` Call Stack

1 | 0.0011 | 396176 | {main}( ) | .../index.php:0 2 | 0.0016 | 396464 | require( '/app/public/wp-blog-header.php' ) | .../index.php:17 3 | 0.4200 | 4389776 | require_once( '/app/public/wp-includes/template-loader.php' ) | .../wp-blog-header.php:19 4 | 0.4300 | 4391856 | include( '/app/public/wp-content/themes/ccpapress/page.php' ) | .../template-loader.php:74 5 | 0.4985 | 4586024 | locate_template( ) | .../page.php:25 6 | 0.4995 | 4586120 | load_template( ) | .../template.php:647 7 | 0.5002 | 4586448 | require_once( '/app/public/wp-content/themes/ccpapress/template-parts/page/content.php' ) | .../template.php:688 8 | 0.5006 | 4586448 | locate_template( ) | .../content.php:29 9 | 0.5013 | 4586560 | load_template( ) | .../template.php:647 10 | 0.5020 | 4594416 | require_once( '/app/public/wp-content/themes/ccpapress/template-parts/acf-blocks/header_sections.php' ) | .../template.php:688 11 | 0.5020 | 4594416 | ign_get_header_image( ) | .../header_sections.php:23 `

saltnpixels commented 5 years ago

Thank you for this info! The theme expected you to have ACF plugin installed. Sounds like you dont have it. I have added conditionals to fix it. However the theme shines the best when you have ACF installed.

ThatKDB commented 5 years ago

Thanks for the update!

I didn't enable ACF since the editors for this site are completely new to WP and I'm not sure yet if I will go full steam with Gutenberg or will need to leverage ACF still.

I really love that your theme leverages all the modern goodness of CSS Grid/Flexbox/CSS Variables, Babel, Gulp, etc. I'm still feeling my way around in the dark with those, so having everything ready to go is great.