Archive Template tags are not working with Php 8.0 in meta views
- This topic has 9 replies, 2 voices, and was last updated 1 year, 10 months ago by
Peter.
-
AuthorPosts
-
June 14, 2023 at 7:41 PM #42195
Gene Teigland
ParticipantHi Team,
I find that the meta views archives templates are not working with Php 8.0. The tags inside the templates that we pickup are not working and because of that the frontend page get blanked.
Here is the debug process I have done:
I enabled the debug mode, but still the pages were blank on accessing them.
Then I find out some meta box errors in server log. Debugging further on this we find out the meta views template is the issue.
So In the meta views templates only the archive templates are having issue. Others like post type template are working fine.
We have used two meta-view templates( Program template(taxonomy term program) and Degree Type(taxonomy term template) ), that works for the program and degree-type taxonomy archive page. while I drafted these template then the page content display the default layout . Attached image(url below) are the templates I’m talking about.If we enable these templates and replaced all meta-view variables with simple text then pages are working fine.
While we add the meta views variable then it comes blank again.
So it seems like the term related variables of the meta views are not supportive with PHP 8.0.
This issue get resolved if we downgrade the PHP version to 7.4Thank you.
June 14, 2023 at 10:10 PM #42204Peter
ModeratorHello,
So it relates to the code in the View template, can you please share the code that you add to the View template? And share a screenshot of the setting box (Type, Location, Render for ...).
June 15, 2023 at 7:47 PM #42221Gene Teigland
ParticipantHi team,
The archive template code screenshot is attached for your reference. While we use the meta views variables like {{ term }} in the archive template then the frontend page that is using this template goes blank.
But If we removed all the meta views variables and passed simple HTML then the page works.
Debugging furthermore on this I removed all the code and just inserted a tag from the insert tag option as {{ term.name }} then also it does not work.Thank you.
June 16, 2023 at 9:39 PM #42248Peter
ModeratorHello,
I've tested this issue with PHP 8.2 and some variables from Insert Fields tab but do not see that. It might relate to your custom code added to the view content.
You can remove one-by-one lines of code to find what causes the issue.
June 19, 2023 at 7:14 PM #42273Gene Teigland
ParticipantHello Peter,
Actually that is what I have already one to remove one by one and check it. Although I have removed the whole code from the view and just put the {{term.name}} t verify this but still the view does not work. Once I remove all the tags and put simple html then it works. So the issue is related to the tags of meta views.
Thank you
June 19, 2023 at 9:54 PM #42282Peter
ModeratorHello,
Please share your site credentials via this contact form https://metabox.io/contact/
I will take a closer look.June 20, 2023 at 5:10 PM #42291Gene Teigland
ParticipantHi Peter,
Here is the website details:(removed)
Here are the backend url of meta view :
https://tcspp.tiger12.com/wp-admin/post.php?post=2504&action=editThis template is rendering on this url :
https://tcspp.tiger12.com/program/behavioral-sciences/Here are the template name which having the issue
( Program template (taxonomy term program) and Degree Type (taxonomy term template) )Thank you.
June 20, 2023 at 10:28 PM #42300Peter
ModeratorHello,
There is an error on your site and I've fixed it. I've escalated this issue to the development team to include the fix in the next update.
June 21, 2023 at 1:44 PM #42306Gene Teigland
ParticipantHi Peter,
Please let me know where did you make the changes? so that I will move the changes to the live site.Thank you.
June 21, 2023 at 8:57 PM #42311Peter
ModeratorHello,
I add the code
if( !is_array( $value ) ) return;
to the file wp-content/plugins/meta-box-aio/vendor/meta-box/mb-views/src/Fields/Video/Renderer.php after line 11it looks like this
$value = RWMB_Video_Field::file_info( $value ); if( !is_array( $value ) ) return;
-
AuthorPosts
- You must be logged in to reply to this topic.