Conversation
supportHi, This plugin was working perfectly, but now I have a fatal error when someone try to generate a pdf. I tried to reinitialize all parameters of the plugin, deactivate all others plugins and even changed the theme, but I still have the same problem. When I activate the debug mode, I have this error : Fatal error : Uncaught ArgumentCountError: Too few arguments to function Vc_Autoload_Manager::{closure}(), 1 passed in /home/lesglobeblogueur/public_html/wp-includes/class-wp-hook.php on line 324 and exactly 2 expected in /home/lesglobeblogueur/public_html/wp-content/plugins/uncode-js_composer/include/autoload/hook-wpb-hide-title.php:13 Stack trace: #0 /home/lesglobeblogueur/public_html/wp-includes/class-wp-hook.php(324): Vc_Autoload_Manager->{closure}() #1 /home/lesglobeblogueur/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters() #2 /home/lesglobeblogueur/public_html/wp-content/plugins/pdf-generator-for-wp/admin/partials/pdf_templates/pdf-generator-for-wp-admin-template1.php(390): apply_filters() #3 /home/lesglobeblogueur/public_html/wp-content/plugins/pdf-generator-for-wp/common/class-pdf-generator-for-wp-common.php(220): return_ob_html() #4 /home/lesglobeblogueur/public_html/wp-content/plugins/pdf-generator-for-wp/common/class-pdf-generator-for-wp-common.php(121): Pdf_Generator_For_Wp_Common->pgfw_generate_pdf_from_library() #5 /home/lesglobeblogueur/public_html/wp-content/plugins/pdf-generator-for-wp/common/class-pdf-generator-for-wp-common.php(101): Pdf_Generator_For_Wp_Common->pgfw_generate_pdf() #6 /home/lesglobeblogueur/public_html/wp-includes/class-wp-hook.php(324): Pdf_Generator_For_Wp_Common->pgfw_generate_pdf_link_catching_user() #7 /home/lesglobeblogueur/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #8 /home/lesglobeblogueur/public_html/wp-includes/plugin.php(517): WP_Hook->do_action() #9 /home/lesglobeblogueur/public_html/wp-settings.php(704): do_action() #10 /home/lesglobeblogueur/public_html/wp-config.php(103): require_once(‘/home/lesglobeb…’) #11 /home/lesglobeblogueur/public_html/wp-load.php(50): require_once(‘/home/lesglobeb…’) #12 /home/lesglobeblogueur/public_html/wp-blog-header.php(13): require_once(‘/home/lesglobeb…’) #13 /home/lesglobeblogueur/public_html/index.php(17): require(‘/home/lesglobeb…’) #14 {main} thrown in /home/lesglobeblogueur/public_html/wp-content/plugins/uncode-js_composer/include/autoload/hook-wpb-hide-title.php on line 13 It looks like it’s related to my theme (uncode), but when I switch to another theme (wordpress 2025), I still have a an error : Warning : DOMDocument::loadHTML(): Tag figure invalid in Entity, line: 1122 in /home/lesglobeblogueur/public_html/wp-content/plugins/pdf-generator-for-wp/common/class-pdf-generator-for-wp-common.php on line 275 Unable to stream pdf: headers already sent Do you think you can help me ? Regards, Seb The page I need help with: [ log in to see the link]
Hello, Thanks for point out the issue The error seems to to the few arguments that are not able to pass or get and for this, we can recommend you one of the solutions Just go through the plugin following the below path “admin/partials/pdf_templates/pdf-generator-for-wp-admin-template1.php” in this file search the below line of code do_shortcode( str_replace( ‘[WORDPRESS_PDF]’, ”, apply_filters( ‘the_title’, $post->post_title ) ) ) and replace with this do_shortcode( str_replace( ‘[WORDPRESS_PDF]’, ”, apply_filters( ‘the_title’, $post->post_title, $post->ID ) ) ) Regards,
It works ! Thank you very much ! Regards
Most Welcome !
Hello, Thanks for point out the issue The error seems to to the few arguments that are not able to pass or get and for this, we can recommend you one of the solutions Just go through the plugin following the below path “admin/partials/pdf_templates/pdf-generator-for-wp-admin-template1.php” in this file search the below line of code do_shortcode( str_replace( ‘[WORDPRESS_PDF]’, ”, apply_filters( ‘the_title’, $post->post_title ) ) ) and replace with this do_shortcode( str_replace( ‘[WORDPRESS_PDF]’, ”, apply_filters( ‘the_title’, $post->post_title, $post->ID ) ) ) Regards,
It works ! Thank you very much ! Regards
Most Welcome !