Support Forum
Hi 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.4
Thank you.
Hello,
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 ...).
Hi 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.
Hello,
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.
Hello 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
Hello,
Please share your site credentials via this contact form https://metabox.io/contact/
I will take a closer look.
Hi 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=edit
This 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.
Hello,
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.
Hi Peter,
Please let me know where did you make the changes? so that I will move the changes to the live site.
Thank you.
Hello,
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 11
it looks like this
$value = RWMB_Video_Field::file_info( $value );
if( !is_array( $value ) ) return;