Skip Navigation

[Resolved] Archive output not working

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Our next available supporter will start replying to tickets in about 1.24 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 14 replies, has 2 voices.

Last updated by Minesh 9 months, 2 weeks ago.

Assisted by: Minesh.

Author
Posts
#2683063

I'm trying to create a directory of chemicals product. I was able to vreate the database. To create the single post view to see the template I created with the data. But It's impossible to create the WordPress archive that will display the list of items to choose from. The exact post source is not available. I tried several and several time in different way to make it work without success and now it's worst then ever I even get error code. Also the pagination, search tool and sort tool are not working properly.

In the Toolset dashboard it's the publication type: Materiaux

What is the link to your site? hidden link

#2683101

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

As I understand - you have a post type "Materiaux" and you want to create a post type archive and that does not display on frontend - is that correct? if yes:

Can you please tell me what theme you are using? If you are using FSE (Full Site Editing) theme, there possibly the issue is but I would like to confirm first.

Please check the following errata page:
- https://toolset.com/errata/toolset-templates-archives-and-dynamic-sources-dont-work-with-fse-themes/

What if you switch to twentytwenty theme and check if you able to see the archive on frontend?

#2683227
Capture d’écran, le 2024-02-13 à 08.15.21.png

I'm using Astra pro. I tried changing the theme to twenty twenty like you asked without success. I have other archive installed with Toolset and never had trouble in the past. But now it seem I also have other problems on other Toolset database. For exemple the archive for a compagny directory used to display several line of items but now only display 3 lines... See screen capture of this related problem.

#2683358

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Can you please share problem URL of your archive and admin access details and let me check whats going wrong with your setup.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2683381

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Do you want me to work on any specific archive - if yes, what is that, can you please share the URL of that archive and what is not working as expected or what is your requirements with that archive, Can you please share all those required details and I would be happy to dive into your site and check whats going wrong with your setup.

#2683387

The main problem is for the archive named Archive Material that you will find in the Toolset dashboard. The archive is not generating properly the post list and there is an extra page numbers (pagination) in the archive loop that spead out of the block. But the page number block at the bottom is working properly. The page that should display the result is : polymeresquebec.com/repertoire-des-resines-additifs/

You will also notise that the page for another archive that was working properly and wich I didn't make any change is now only displaying 3 results instead of the 25 records: hidden link

#2683401

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I see you are using Astra theme and here is the errata page with affects the Views/Blocks pagination:
- https://toolset.com/errata/custom-archive-pagination-broken-by-astra-theme/

I've added the following code to "Custom code" section offered by Toolset:
- hidden link

add_filter( 'astra_blog_post_per_page_exclusions', function( $post_types ){

// array of post type slugs with custom archives to apply this workaround to
$custom_archives = array( 'materiau' );

$exclusions = array_merge( $post_types, $custom_archives );

return $exclusions;
} );

- You can add any post type slug for which you see the issue with $custom_archives.

So, now I can see with your archive it does display 10 results per page which is set by your archive pagination. You may increase the number of posts to display with your pagination that should help you to reduce the number of pages.

#2683407

Hi, Thanks but when I try accessing the page I get this error message:

Fatal error: Allowed memory size of 805306368 bytes exhausted (tried to allocate 194827840 bytes) in /home/customer/www/polymeresquebec.com/public_html/wp-includes/class-wpdb.php on line 2349

#2683430

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Can you please try to increase the memory for your site or server.

Please check the following links:
- hidden link
- hidden link
- hidden link

#2683435

Hi, the memory limit setting is already at the maximum allowed by our hosting provider and its 768M.

#2683569

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I already noticed that you are using hundreds of plugins and when I try to access the site it was already slow.

Can you please try again and check. On what page you have Fatal error issue?

#2683602

The site was just a little bit slow before I added the new Toolset post archive. This archive is huge. The problematic page is: hidden link

#2683767

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

It shows the fatal error related to memory but you say you have maximum memory assigned.

I do not have much to say here, your site seems to be heavy and it may require more resource and the current resources should not be enough. Maybe you can still try to deactivate plugins one by one and check what plugin is causing the issue to know what is the root cause of this fatal error related to memory.

#2683801

Hi your workaround code for the number of items displayed is not working. I still see only 3 items in the «entreprises» list as you can see in the screen capture in attachment. Could you please double check. I also tried to implement some different code for the other posts but not sure it's working. As for the number of plugin, when plugin like toolset requires 8 different plugins instead of one it sure fireup the total number of plugins....

#2683804

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Can you please check now: hidden link

I've adjusted the code as given under where you will have to add your post type slug to the array:

add_filter( 'astra_blog_post_per_page_exclusions', function( $post_types ){

// array of post type slugs with custom archives to apply this workaround to
$custom_archives = array( 'materiau','materiaux','entreprises','webinaire','place-marche');
  
$exclusions = array_merge( $post_types, $custom_archives );

return $exclusions;
} );

Can you please confirm it works as expected.