WordPress.org

Ready to get started?Download WordPress

Forums

WordPress SEO by Yoast
Yoast plugin makes some PAGES display as Blog listing pages (11 posts)

  1. csbecker
    Member
    Posted 1 year ago #

    I'm working on this development site for a website: http://acquireb2bdev.com/resources/data-sheets.

    For the past two mornings, this page and 5 others arbitrarily get changed to Blog pages so the normal content that is on that page turns to "There are no posts in this category" or something like this. So I have gone through all of my plugins and turned them off and then back on one at a time and the pages reverted to their PAGE status so I was able to see the content again.

    Has anyone else seen this kind of result and know of any conflicts?
    We would appreciate any help with this.

    Thanks, Chris

    http://wordpress.org/extend/plugins/wordpress-seo/

  2. csbecker
    Member
    Posted 1 year ago #

    The page currently shows the content, so going there you won't see that message, but it's basically acting like a Blog listing page.

    Again, I would appreciate any assistance.

  3. csbecker
    Member
    Posted 1 year ago #

    OK so now our site is live.
    http://www.virtualworks.com/resources/data-sheets

    It's still showing this random problem. Randomly this page and others (but not all) change to Blog pages and show the "There are no posts in this category" message. I temporarily fix the problem by disabling WP SEO and then re-activating it. Everything then runs normally.

    My site is built on the Genesis platform. These pages are regular pages - nothing special and are using the generic template.

    Is there a way that I could find an error message and give it to you? Because otherwise I'm not seeing an error anywhere.

    Thanks. Chris

  4. jrf
    Member
    Posted 1 year ago #

    Hi Chris,

    Have a look at this code which you can add to your wp-config.php file.
    It will log any and all php errors to a file, independently of whether you have WP_DEBUG set to true. That way you can keep track of PHP issues on a live website.

    I'd be very interested to hear if any errors relating to this issue show up in the log.
    Be aware: logging errors will generally scare the living daylights out of most people as they suddenly start realising how many plugins are throwing errors....

    Hope this helps!

    Smile,
    Juliette

  5. csbecker
    Member
    Posted 1 year ago #

    Thanks Juliette,
    I'll give it a try and let you know. I hope we'll be able to resolve this.
    Thanks

  6. csbecker
    Member
    Posted 1 year ago #

    Thanks Juliette,
    So I've added the error code to my wp-config on the staging server:
    http://acquireb2bdev.com/resources/data-sheets
    The staging site currently shows the incorrect view on those pages by not showing the page content and the pages are being rendered as blog listing pages.

    The error code is not creating a file to share with you so I must have some setting wrong (I created a logs directory with 777 rights but no file gets created in there - I didn't modify the .htaccess file - is that really necessary?) but you can go to the page(s) and see all of our beautiful warnings etc.

    Could you take a look and see if you can detect why this is happening?
    I really appreciate your time.

    Chris

  7. jrf
    Member
    Posted 1 year ago #

    Hi Chris,

    To address the issues one at a time:

    The error code is not creating a file to share with you so I must have some setting wrong (I created a logs directory with 777 rights but no file gets created in there - I didn't modify the .htaccess file - is that really necessary?)

    The best way to work with error logs is to have a separate directory for the log files. In *that* directory you *should* add a .htaccess file to prevent access to the log. You *should not* change the WP root .htaccess file.
    You can find an example for the log directory specific .htaccess file here.

    Also: add an empty (text) file called error.log to that directory and CHMOD it to be writable & try again.

    Next: the errors I see on your staging site:

    Error 1 & 2:

    Backtrace from warning 'Undefined index: jquery-core' at /home/ab2bdev/public_html/wp-content/plugins/connections/includes/class.scripts.php 263:
    <...snip...>
    /home/ab2bdev/public_html/wp-content/plugins/advanced-custom-fields/acf.php 379 calling wp_register_script()
    <...snip...>

    Backtrace from warning 'Undefined index: jquery-migrate' at /home/ab2bdev/public_html/wp-content/plugins/connections/includes/class.scripts.php 264:
    <...snip...>
    /home/ab2bdev/public_html/wp-content/plugins/advanced-custom-fields/acf.php 379 calling wp_register_script()
    <...snip...>

    I've highlighted the relevant parts. As you can see, these are errors from the Advanced Custom Fields plugin. From the looks of it, ACF is making some mistakes in how it's registering the scripts it requires.
    I suggest you ask them to fix this. You can point them to this page for help on finding the right script handles.

    Error 3, 4 & 5:

    Backtrace from warning 'Undefined property: WP_Query::$post' at /home/ab2bdev/public_html/wp-content/plugins/lightbox-plus/lightboxplus.php 196:
    <...snip...>

    Backtrace from warning 'Trying to get property of non-object' at /home/ab2bdev/public_html/wp-content/plugins/lightbox-plus/lightboxplus.php 196:
    <...snip...>

    Backtrace from warning 'Trying to get property of non-object' at /home/ab2bdev/public_html/wp-content/plugins/lightbox-plus/classes/actions.class.php 78:
    <...snip...>

    Again: I've highlighted the relevant parts. The errors are caused by the Lightbox Plus plugin. Here it looks like they're trying to get a post object when it's either not yet defined or unavailable for some other reason. Fixing the first error here will probably get rid off the other two as well.
    Again, I suggest you ask them to fix this.

    All in all, no errors caused by WP SEO, but the errors caused by the other plugins can easily prevent other scripts from loading correctly which could explain your empty page.

    Hope this helps.

    Smile,
    Juliette

  8. jrf
    Member
    Posted 1 year ago #

    Oh dear, I just notice there are even more errors at the bottom of the page...

    So here goes:

    Error 6 & 7:

    Backtrace from warning 'Trying to get property of non-object' at /home/ab2bdev/public_html/wp-includes/post-template.php 29:
    /home/ab2bdev/public_html/wp-content/plugins/pardot/includes/pardot-template-tags.php 53 calling get_the_ID()
    /home/ab2bdev/public_html/wp-content/plugins/pardot/includes/pardot-plugin-class.php 520 calling pardot_dc_async_script()
    <...snip...>

    Backtrace from warning 'Trying to get property of non-object' at /home/ab2bdev/public_html/wp-includes/post-template.php 208:
    /home/ab2bdev/public_html/wp-content/plugins/pardot/includes/pardot-template-tags.php 53 calling get_the_content()
    /home/ab2bdev/public_html/wp-content/plugins/pardot/includes/pardot-plugin-class.php 520 calling pardot_dc_async_script()
    <...snip...>

    Now this is the Pardot plugin making poo-poo. Looks like they too are trying to get access to post information in the wrong way/outside the loop or something of the kind.
    Again, I suggest you ask them to fix this.

    Error 8:

    Backtrace from warning 'Trying to get property of non-object' at /home/ab2bdev/public_html/wp-content/plugins/lightbox-plus/classes/actions.class.php 139:
    <...snip...>

    And here we have yet another error caused by Lightbox Plus...

  9. csbecker
    Member
    Posted 1 year ago #

    Thanks so much Juliette! I've posted some new forum requests. Fingers crossed.

  10. jrf
    Member
    Posted 1 year ago #

    Crossing them now ;-)

  11. csbecker
    Member
    Posted 1 year ago #

    So I'm still having this problem on the dev and live sites:
    http://acquireb2bdev.com/solutions

    http://www.virtualworks.com/solutions

    Again, the reason why I believe it's a Yoast issue is that when I disable the Yoast SEO plugin and re-enable it, the site works as expected. If I just disable the plugin, the site's broken.

    I got a response back from one of them saying that we have a problem with out of scope variables:

    I think you might be trying to use the $post variable out of scope—try throwing global $post; at the top of the PHP file in question and see if that fixes it.

    This is beyond my understanding so I've told them I don't know what to do with it.

    This is really baffling.
    Why would only some pages get changed to blog listing pages while other pages maintain their normal status of a page with the default template? Why would disabling and then re-enabling the Yoast plugin fix the problem if the Yoast plugin wasn't the problem?

    Thanks in advance for your help.
    Chris

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic