pods-framework / pods

The Pods Framework is a Content Development Framework for WordPress - It lets you create and extend content types that can be used for any project. Add fields of various types we've built in, or add your own with custom inputs, you have total control.
https://pods.io/
GNU General Public License v2.0
1.07k stars 264 forks source link

Conflict with Pods and the Sage theme wrapper #5350

Open jackhogg opened 5 years ago

jackhogg commented 5 years ago

Pod seems to be preventing template_include from firing, when a custom page template is used (e.g., 'X-page.blade.php',) and the page then merely displays the blade template code as it's written in the file. Is there a way to resolve or work around this? Sage's discussion board and GitHub issues mention this being an issue, but suggest that the problem is with how Pods handles custom templates.

jimtrue commented 5 years ago

@jackhogg Can you please provide us links to issues from the Sage theme wrapper GitHub? We don't actually do anything special with custom templates, our Auto Template functionality feeds into the_content filter but without more details to the issue it's very hard for us to work with the other provider to troubleshoot.

jimtrue commented 5 years ago

@jackhogg Are you referring to this issue which is the only time I found Pods mentioned in 'sage' github, back from 2014: https://github.com/roots/sage/issues/1129

I found two places where we are calling template_redirect from that issue: https://github.com/pods-framework/pods/blob/edc95828c1fc94f8003d0fc8d2f3ac7bde69493b/components/Templates/includes/auto-template/Pods_Templates_Auto_Template_Front_End.php#L22

and

https://github.com/pods-framework/pods/blob/d80d8d009850b6d18ff51566f85af683c891690b/components/Pages.php#L889

Dropping this for @sc0ttkclark to have a look at.

sc0ttkclark commented 5 years ago

The only place that would be incompatible with Sage here is the way we handle template_redirect for pod pages (the second piece of code Jim sent). Is this specifically in regards to your use of Pod Pages and choosing a custom page template file?

jackhogg commented 5 years ago

@sc0ttkclark Yes, it seem to be specifically related to Pods Pages, when using a custom page template.

sc0ttkclark commented 5 years ago

In that case, this isn’t easily fixed within Pod Pages. It requires more rewriting of that code and testing.

sc0ttkclark commented 2 years ago

I've got some fixes for this but it was not easy to figure out a workaround.

Commits in Pods 2.8.11 that help bring the first initial compatibility work to support Sage can be found here: