Hi, on this page:
hidden link
you see a view of all posts.
Clicking on the title is opening the single page.
this page is empty after the latest updates of Toolset.
What can be the problem? Is this a bug?
here an example of such a page hidden link
Dear Dido,
It is abnormal, we need to konw if there are some PHP errors occur in your website, I suggest you check these:
1) Make sure you are using the latest version of Toolset plugins, you can download theme here:
https://toolset.com/account/downloads/
2) deactivate other plugins and switch to wordpress default theme, and test again
3) Enable PHP debug mode, copy and paste the debug logs here
PHP Debugging
In case you think that Types or Views are doing something wrong (what we call a bug), you should enable PHP error logging. Again, edit your wp-config.php file and add the following:
ini_set('log_errors',TRUE);
ini_set('error_reporting', E_ALL);
ini_set('error_log', dirname(__FILE__) . '/error_log.txt');
This will produce a file called ‘error_log.txt’ in your WordPress root directory. Make sure that the web server can create and write this file. If it cannot, use an FTP program to create the file and make it writable to Apache (normally, user www-data).
https://toolset.com/documentation/user-guides/debugging-types-and-views/
Hi, we tried everything. We think it is an issue with Enfold.
When I do a preview with twentyseventeen, I see the content.
When I Enable Toolset debug, I see no log on the singlepages.
it seems that Toolset is not loaded on those pages.
Here is an errorlog from the debug option in the wp-config
[28-Feb-2017 20:53:59 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; GDPTDefaults has a deprecated constructor in /var/www/vhosts/bourgondischezaken.com/httpdocs/plus/wp-content/plugins/gd-press-tools/code/defaults.php on line 3
[28-Feb-2017 20:53:59 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; gdDebugGDPT has a deprecated constructor in /var/www/vhosts/bourgondischezaken.com/httpdocs/plus/wp-content/plugins/gd-press-tools/gdragon/gd_debug.php on line 33
[28-Feb-2017 20:53:59 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; gdSortObjectsArrayGDPT has a deprecated constructor in /var/www/vhosts/bourgondischezaken.com/httpdocs/plus/wp-content/plugins/gd-press-tools/gdragon/gd_functions.php on line 516
[28-Feb-2017 20:53:59 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; gdptPostViews has a deprecated constructor in /var/www/vhosts/bourgondischezaken.com/httpdocs/plus/wp-content/plugins/gd-press-tools/code/classes.php on line 3
[28-Feb-2017 20:53:59 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; gdptStats has a deprecated constructor in /var/www/vhosts/bourgondischezaken.com/httpdocs/plus/wp-content/plugins/gd-press-tools/code/classes.php on line 14
[28-Feb-2017 20:53:59 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; gdptAvatar has a deprecated constructor in /var/www/vhosts/bourgondischezaken.com/httpdocs/plus/wp-content/plugins/gd-press-tools/code/classes.php on line 28
[28-Feb-2017 20:53:59 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; gdMySQLBackup has a deprecated constructor in /var/www/vhosts/bourgondischezaken.com/httpdocs/plus/wp-content/plugins/gd-press-tools/code/db.php on line 333
[28-Feb-2017 20:53:59 UTC] PHP Deprecated: Non-static method gdFunctionsGDPT::size_format() should not be called statically in /var/www/vhosts/bourgondischezaken.com/httpdocs/plus/wp-content/plugins/gd-press-tools/gd-press-tools.php on line 80
[28-Feb-2017 20:53:59 UTC] PHP Notice: Only variables should be passed by reference in /var/www/vhosts/bourgondischezaken.com/httpdocs/plus/wp-content/plugins/gd-press-tools/gd-press-tools.php on line 187
[28-Feb-2017 20:53:59 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; WP_RSSjb has a deprecated constructor in /var/www/vhosts/bourgondischezaken.com/httpdocs/plus/wp-content/plugins/rss-just-better/RSS-just-better.php on line 113
[28-Feb-2017 20:54:00 UTC] PHP Notice: De aangeroepen constructiemethode voor WP_Widget in WP_RSSjb is niet meer in gebruik sinds versie 4.3.0. Gebruik in plaats daarvan: <pre>__construct()</pre>. in /var/www/vhosts/bourgondischezaken.com/httpdocs/plus/wp-includes/functions.php on line 3891
[28-Feb-2017 20:54:01 UTC] PHP Deprecated: Non-static method gdFunctionsGDPT::size_format() should not be called statically in /var/www/vhosts/bourgondischezaken.com/httpdocs/plus/wp-content/plugins/gd-press-tools/gd-press-tools.php on line 561
[28-Feb-2017 20:54:01 UTC] PHP Deprecated: Non-static method gdFunctionsGDPT::size_format() should not be called statically in /var/www/vhosts/bourgondischezaken.com/httpdocs/plus/wp-content/plugins/gd-press-tools/gd-press-tools.php on line 515
[28-Feb-2017 20:54:01 UTC] PHP Deprecated: Non-static method GDPTDB::insert_posts_views() should not be called statically in /var/www/vhosts/bourgondischezaken.com/httpdocs/plus/wp-content/plugins/gd-press-tools/gd-press-tools.php on line 703
[28-Feb-2017 20:54:01 UTC] PHP Deprecated: Non-static method GDPTDB::insert_users_tracking() should not be called statically in /var/www/vhosts/bourgondischezaken.com/httpdocs/plus/wp-content/plugins/gd-press-tools/gd-press-tools.php on line 713
[28-Feb-2017 20:54:05 UTC] PHP Deprecated: Non-static method gdFunctionsGDPT::size_format() should not be called statically in /var/www/vhosts/bourgondischezaken.com/httpdocs/plus/wp-content/plugins/gd-press-tools/gd-press-tools.php on line 80
[28-Feb-2017 20:54:05 UTC] PHP Notice: Only variables should be passed by reference in /var/www/vhosts/bourgondischezaken.com/httpdocs/plus/wp-content/plugins/gd-press-tools/gd-press-tools.php on line 187
[28-Feb-2017 20:54:05 UTC] PHP Notice: Only variables should be passed by reference in /var/www/vhosts/bourgondischezaken.com/httpdocs/plus/wp-content/plugins/gd-press-tools/code/admin.php on line 27
[28-Feb-2017 20:54:05 UTC] PHP Notice: De aangeroepen constructiemethode voor WP_Widget in WP_RSSjb is niet meer in gebruik sinds versie 4.3.0. Gebruik in plaats daarvan: <pre>__construct()</pre>. in /var/www/vhosts/bourgondischezaken.com/httpdocs/plus/wp-includes/functions.php on line 3891
[28-Feb-2017 20:54:05 UTC] PHP Deprecated: Non-static method gdFunctionsGDPT::size_format() should not be called statically in /var/www/vhosts/bourgondischezaken.com/httpdocs/plus/wp-content/plugins/gd-press-tools/gd-press-tools.php on line 561
If it is a compatibility problem with Enfold theme, please provide a copy of your website, I need to duplicate same problem and debug it in my localhost:
https://toolset.com/faq/provide-supporters-copy-site/
Thanks for the details, I am downloading the files, will feedback if there is anything found
Here is what I found, the Enfold does not use wordpress function the_content() to render the post content, and the function the_content() does not work in Enfold theme, currently I suggest you create a theme file "single-aanbieding.php" in the child theme folder, with below codes:
<?php
if ( !defined('ABSPATH') ){ die(); }
global $avia_config;
/*
* get_header is a basic wordpress function, used to retrieve the header.php file in your theme directory.
*/
get_header();
$title = __('Blog - Latest News', 'avia_framework'); //default blog title
$t_link = home_url('/');
$t_sub = "";
if(avia_get_option('frontpage') && $new = avia_get_option('blogpage'))
{
$title = get_the_title($new); //if the blog is attached to a page use this title
$t_link = get_permalink($new);
$t_sub = avia_post_meta($new, 'subtitle');
}
if( get_post_meta(get_the_ID(), 'header', true) != 'no') echo avia_title(array('heading'=>'strong', 'title' => $title, 'link' => $t_link, 'subtitle' => $t_sub));
do_action( 'ava_after_main_title' );
?>
<div class='container_wrap container_wrap_first main_color <?php avia_layout_class( 'main' ); ?>'>
<div class='container template-blog template-single-blog '>
<main class='content units <?php avia_layout_class( 'content' ); ?> <?php echo avia_blog_class_string(); ?>' <?php avia_markup_helper(array('context' => 'content','post_type'=>'post'));?>>
this is single-aanbieding.php!
<?php
/* Run the loop to output the posts.
* If you want to overload this in a child theme then include a file
* called loop-index.php and that will be used instead.
*
*/
//get_template_part( 'includes/loop', 'index' );
//show related posts based on tags if there are any
// get_template_part( 'includes/related-posts');
//wordpress function that loads the comments template "comments.php"
// comments_template();
?>
<?php
// here render the Views content template
$views_template = get_post_meta(get_the_ID(), '_views_template', true);
if($views_template){
$views_template_post = get_post($views_template);
$post_name = $views_template_post->post_name;
do_shortcode("[wpv-post-body view_template='$views_template_post->post_name']");
}
?>
<!--end content-->
</main>
<?php
$avia_config['currently_viewing'] = "blog";
//get the sidebar
get_sidebar();
?>
</div><!--end container-->
</div><!-- close default .container_wrap element -->
<?php get_footer(); ?>
Hi Luo,
Thank you very much! I think there is a littel piece of code what I must remove, but I am not sure what. I see the text:
this is single-aanbieding.php!
Can you help with this last thing?
I discovered a strange thing. When I click on a title here:
hidden link
It works and I see a differten link.
hidden link
1) this is single-aanbieding.php!,
You can edit the file "single-aanbieding.php", find and remove above text.
I added that text just for testing.
2) file "single-aanbieding.php" only works for the single post of post type "aanbieding", if you need to apply it to other post type, you can save it as other file name, for example:
"single-my-cpt2.php".
More help:
https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
single-{post-type}.php – If the post type is product, WordPress would look for single-product.php.
1 I removed the line, but it is not working yet....
2 I understand that I have to make a copy for eacht cpt, but I was surprised that the activiteiten are working and have a different link... only saying... (look at the links, with an ?
?activiteiten-markt=carmina-burana
It is a new question, please try this:
Dashboard-> Toolset-> Post Types
Find and edit the post type "Activiteiten", in section "Options", enable option "Rewrite", and test again.
Hi, I come back with my first question. I still see a white page.
I can not duplicate same problem with the duplicator package you provided, if the problem still exists, please provide a test site with same problem, and fill below private detail box with login details and ftp access, I need a live website to test and debug
I fixed it myself.
this must be the code:
$views_template = get_post_meta(get_the_ID(), '_views_template', true);
if($views_template){
$views_template_post = get_post($views_template);
$post_name = $views_template_post->post_name;
$content_output .= do_shortcode("[wpv-post-body view_template='$views_template_post->post_name']");
}
So you don't have to look anymore.
Thanks for share the solution, please let me know if you need other assistance