• kmoyer

    (@kmoyer)


    I am not sure when this began happening as I just noticed but was working fine in the past.

    My category pages have stopped showing posts. This is both from the menu bar and from the side bar menus.

    I have tried many things. Clearing cache, multiple times I have inactivated all plugins and reactivated. I reset my permalinks. The one thing I noticed is I when I save permalinks setting it takes me to a 404 error page but it does save the permalink structure this is odd behavior. I have also gone to my host to see if there is something blocking something. I am somewhat technical but not expert.

    I just emailed webriti thinking maybe this might have to do with my template Spa Salon. I cannot seem to see anything there either.

    I am stuck so hoping for some help here.

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • There is some PHP fatal error that’s happening which halts the HTML output on category pages. If you check your PHP logs in your hosting panel, you would find what’s causing it. Then it would be a matter of addressing that.

    You can also try the approach of deactivating all plugins to see, what’s causing it. I know you said you tried that, but its important to be logged in when you try that, so that you don’t accidentally view a cached page (caching plugins usually don’t cache pages for logged in users).

    Feel free to come back here with that error message you find for the category pages and I can help further.

    Thread Starter kmoyer

    (@kmoyer)

    Thank you for the response. Here are the errors in the error logs. I am just technical enough to be dangerous. Lol… Any help of guidance is appreciated. I definitely think my template is the culprit and the sellers are not responding. Hoping that I can fix this so I don’t have to begin again.

    I found an issue with one of my plugins that was causing errors so deactivated until I figure this issue out.

    [26-May-2023 17:26:38 UTC] PHP Fatal error:  Uncaught TypeError: Cannot access offset of type string on string in /home/illu6668/public_html/wp-content/themes/spasalon-pro2/functions/template-tag.php:36
    
    Stack trace:
    
    #0 /home/illu6668/public_html/wp-content/themes/spasalon-pro2/category.php(9): spasalon_page_banner_strip()
    
    #1 /home/illu6668/public_html/wp-includes/template-loader.php(106): include('/home/illu6668/...')
    
    #2 /home/illu6668/public_html/wp-blog-header.php(19): require_once('/home/illu6668/...')
    
    #3 /home/illu6668/public_html/index.php(17): require('/home/illu6668/...')
    
    #4 {main}
    
      thrown in /home/illu6668/public_html/wp-content/themes/spasalon-pro2/functions/template-tag.php on line 36
    
    [26-May-2023 17:26:45 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/illu6668/public_html/wp-content/themes/spasalon-pro2/comments.php on line 17
    
    [26-May-2023 17:26:45 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/illu6668/public_html/wp-content/themes/spasalon-pro2/comments.php on line 17
    
    [26-May-2023 17:26:45 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/illu6668/public_html/wp-content/themes/spasalon-pro2/comments.php on line 17
    
    [26-May-2023 17:26:45 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/illu6668/public_html/wp-content/themes/spasalon-pro2/comments.php on line 17
    
    [26-May-2023 17:26:45 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/illu6668/public_html/wp-content/themes/spasalon-pro2/comments.php on line 17
    
    [26-May-2023 17:26:45 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/illu6668/public_html/wp-content/themes/spasalon-pro2/comments.php on line 17
    
    [26-May-2023 17:26:45 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/illu6668/public_html/wp-content/themes/spasalon-pro2/comments.php on line 17
    
    [26-May-2023 17:26:45 UTC] PHP Warning:  Trying to access array offset on value of type null in /home/illu6668/public_html/wp-content/themes/spasalon-pro2/comments.php on line 17
    
    [26-May-2023 17:40:58 UTC] PHP Fatal error:  Uncaught TypeError: Cannot access offset of type string on string in /home/illu6668/public_html/wp-content/themes/spasalon-pro2/functions/template-tag.php:36
    • This reply was modified 1 year ago by kmoyer.
    Thread Starter kmoyer

    (@kmoyer)

    I am sill looking for a solution. Any help would be appreciated.

    error = “TypeError” related to accessing an offset of type string on a string in the file template-tag.php on line 36.

    Here is the code that includes line 36 in template-tag.php file

    elseif( is_category() ){ $h1 = $current_options[‘banner_title_one_category’]; $h2 = $current_options[‘banner_title_two_category’]; $bd = $current_options[‘banner_description_category’]; $my_meta[‘banner_enable’]=true;

    Seems like $current_options is an empty string rather than an array, which causes an issue when code tries to lookup an entry inside of it.

    You can try to save settings in your theme, where you control the banner title for category or something & that should fix it. Otherwise, to fix it in code, I would need to see the whole file but it would be something like:

    if isset( $current_options['banner_title_one_category'] ) {
        $h1 = $current_options['banner_title_one_category'];
    }
    if isset( $current_options['banner_title_two_category'] ) {
        $h2 = $current_options['banner_title_two_category'];
    }
    if isset( $current_options['banner_description_category'] ) {
        $bd = $current_options['banner_description_category'];
    }
    Thread Starter kmoyer

    (@kmoyer)

    I have not been able to get Webriti to respond to me for this issue or another issue of not being able to log into the support board. So frustrating.

    I tried saving the banner settings and this does not seem to be doing anything. The strange thing is the setting’s don’t seem to do anything. hmmm..

    Help would be appreciated. I am not sure of the way to fix this in the code. Please let me know what you need to guide me through this.

    Thank you for responding to my issue.

    Kelly

    Were you able to try the code snippet I gave you? If you can’t fiddle with code yourself, I think your best bet would be to switch themes.

    Thread Starter kmoyer

    (@kmoyer)

    Thanks for your help. I did try the code snippet with no luck. I am in research mode now trying to find a solution. If I can’t figure it out I will try a new template. Trying to avoid this as I don’t really want to have to rebuild stuff.

    I also tried saving the settings in my theme and figured out that may not be totally working either. When I turned off the banner it still shows up still. Very interesting.

    Thank You again for the help.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Posts stopped showing on Category Pages’ is closed to new replies.