Fatal error on loop.php

Posted in: Newsmag
Post count: 26

I’ve got a Fatal error on my blog.

Fatal error: Call to undefined method td_api_module::_helper_get_module_class_from_loop_id() in /data05/virt43375/domeenid/www.kiip.ee/htdocs/wp-content/themes/Newsmag/loop.php on line 19

You can check it out on kiip.ee

I re-downloaded the theme and copy-pasted the original loop.php code over the one I had active. But the error is still there. Any help?

Post count: 26

I deleted all of the “loop” files from FTP and re-uploaded new ones from the re-downloaded theme. Nothing…

The liip.php file that I’ve got:
<?php
/**
* If you are looking for the loop that's handling the single post page (single.php), check out loop-single.php
**/

// $global_flag_to_hide_no_post_to_display - comes from page-category-big-grid.php and is a flag to hide the 'No posts to display' message if on category page there are between 1 and 5 posts
global $loop_module_id, $loop_sidebar_position, $global_flag_to_hide_no_post_to_display;

///if we are in wordpress loop; used by quotes in blocks to check if the blocks are displayed in blocks or in loop
td_global::$is_wordpress_loop = true;

$td_template_layout = new td_template_layout($loop_sidebar_position);

if (empty($loop_module_id)) { //not sure if we need a default here
$loop_module_id = 1;
}

$td_module_class = td_api_module::_helper_get_module_class_from_loop_id($loop_module_id);

//disable the grid for some of the modules
$td_module_api = td_api_module::get_by_id($td_module_class);
if ($td_module_api['uses_columns'] === false) {
$td_template_layout->disable_output();
}

if (have_posts()) {
while ( have_posts() ) : the_post();
echo $td_template_layout->layout_open_element();

if (class_exists($td_module_class)) {
$td_mod = new $td_module_class($post);
echo $td_mod->render();
} else {
td_util::error(__FILE__, 'Missing module: ' . $td_module_class);
}

echo $td_template_layout->layout_close_element();
$td_template_layout->layout_next();
endwhile; //end loop
echo $td_template_layout->close_all_tags();

} else {
/**
* no posts to display. This function generates the __td('No posts to display').
* the text can be overwritten by the themplate using the global @see td_global::$custom_no_posts_message
*/

echo td_page_generator::no_posts();
}

Post count: 23312

Hello ronaldliive,

I’ve checked your website and I saw the error. Do you have any customization on your theme? Please try to update theme to the ultimate version.

You will have to re-add/add some options as the theme contain now more features. If you run the import script after the update it should – https://forum.tagdiv.com/how-to-update-the-theme-2/

Before update please backup the site (database and files) – https://codex.wordpress.org/WordPress_Backups

You have to remove theme via FTP and install the new one and also the plugins that come with the theme files, you can find them it in the theme package inside the Plugins folder – http://screencast.com/t/lkrma6blYE

Also, please try to change your modules on category and check if the problem persists. http://screencast.com/t/owBvphWu

Hope this helps and let us know how it goes!

Thank you for the message!

Post count: 26

I did not change any settings and it started to display the error message. I have the auto-update feature on via Envato Toolkit but it did not update the theme. Going to back up see if the problem is still there.

Post count: 26

Updating the theme did the trick. Now the question is why it didn’t auto update via the envato toolkit? But that should be a question for them, right?

Post count: 23312

Hello ronaldliive,

Unfortunately there is not an option to Auto-update. You have to update it manually, if you want when the message warns you in the panel.

Thank you!

Post count: 9544

Avoid using the Envato tool kit if you can; FTP is still the best way.

Viewing 7 posts - 1 through 7 (of 7 total)
The forum ‘Newsmag’ is closed to new topics and replies.