Title: Backtrace from warning
Last modified: August 1, 2023

---

# Backtrace from warning

 *  [Tomas Risberg](https://wordpress.org/support/users/tomasrisbergsilentse/)
 * (@tomasrisbergsilentse)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/backtrace-from-warning/)
 * If you try to access the page you will receive this message:
 * Backtrace from warning ‘Undefined variable $request_items’ at /home/silent/domains/
   silent.se/public_html/wp-content/plugins/zotpress/lib/shortcode/shortcode.functions.
   php 597:
 * and so on. If I remove this at that bottom
 * [zotpressInTextBib style=”vancouver” sortby=”default” sort=”ASC”]
 * the page will load, but with the spinning gears. I have searched all the in-text
   reference codes, but can not find any of them with obvious errors.
 * Anyone here that know what to do for to solve this problem?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fbacktrace-from-warning%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Thread Starter [Tomas Risberg](https://wordpress.org/support/users/tomasrisbergsilentse/)
 * (@tomasrisbergsilentse)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/backtrace-from-warning/#post-16939768)
 * I have tested and found that removing two references from the page fixed the 
   problem. My host analyzed the problem quickly and they say that there is a restriction
   in Zotpress, so that you can not have more than 50 references on one page. I 
   had 53. Now there is 51 and the page works.
 * Does anyone here know how to adjust this limit? I want to be able to have more
   than 50 references on this particular page.
 * My host sent me this image from a part of Zotpress
 * ![](https://i0.wp.com/silent.se/dp/zp.png?ssl=1)
 *  [ericcorbett2](https://wordpress.org/support/users/ericcorbett2/)
 * (@ericcorbett2)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/backtrace-from-warning/#post-16942533)
 * I had a problem in that area of code as well, not quite the same as yours, but
   it may be related. I worked around it by adding a check to determine whether 
   $request_items was countable. Might be worth a try?
 *     ```wp-block-code
                   foreach ( $items as $item ) {
                       if ( is_countable($request_items)) {
                           if ( count($request_items) < 50 ) {
                               $request_items[] = $item;
                           }
                       }
                       else {
                           $requests[] = $request_items;
                           unset( $request_items );
                       }
                   }
       ```
   
 * I think your hosting company isn’t correct in saying that you can only have 50
   references – you still have 51 anyway – and I’ve certainly got pages with way
   more than 50 references that work fine, such as [https://engole.info/a-christmas-carol](https://engole.info/a-christmas-carol)
    -  This reply was modified 3 years, 1 month ago by [ericcorbett2](https://wordpress.org/support/users/ericcorbett2/).
 *  Thread Starter [Tomas Risberg](https://wordpress.org/support/users/tomasrisbergsilentse/)
 * (@tomasrisbergsilentse)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/backtrace-from-warning/#post-16943447)
 * Thank you! This is most interesting. I can see that you have 121 references at
   that page!
 * When I first wrote to my host I cited a part of the Zotpress FAQ, and it still
   seems possible my problem is related to a too short timeout at their server:
 * “First, check
   with your web host or server admin to make sure that one of cURL,
   fopenwith Streams (PHP 5), or fsockopen is enabled. If so, check to see ifyour
   server has any restrictions on timeouts (Zotpress sometimes needsmore than 30
   seconds to process a request to the Zotero servers).”
 * I want to try your code. Can you tell me where in Zotpress to put it?
 *  Thread Starter [Tomas Risberg](https://wordpress.org/support/users/tomasrisbergsilentse/)
 * (@tomasrisbergsilentse)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/backtrace-from-warning/#post-16949844)
 * I tried to add the suggestet code in the shortcode.functions.php file above and
   then below the code you seen in the image my host sent me. It didn’t solve the
   problem, but maybe the code should be added somewhere else in Zotpress? (I know
   nothing about coding.)

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Backtrace from warning’ is closed to new replies.

 * ![](https://ps.w.org/zotpress/assets/icon-256x256.png?rev=1995512)
 * [Zotpress](https://wordpress.org/plugins/zotpress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/zotpress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/zotpress/)
 * [Active Topics](https://wordpress.org/support/plugin/zotpress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/zotpress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/zotpress/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Tomas Risberg](https://wordpress.org/support/users/tomasrisbergsilentse/)
 * Last activity: [3 years, 1 month ago](https://wordpress.org/support/topic/backtrace-from-warning/#post-16949844)
 * Status: not resolved