• Resolved fncll

    (@fncll)


    If I add content=full to my shortcode, LCP does nothing. You can see the problem:

    On this page (https://fncll.org/reading/) I have the code [catlist tags="reading-log" numberposts=10]: and it works as expected.

    On this page (https://fncll.org/reading-test/) I have the code: [catlist tags="reading-log" numberposts=10 content=full] and there is nothing where the list should be.

    I am running LCP Version 0.83.1 on WP 5.4.2

    I tried changing themes but it didn’t make any difference.

    • This topic was modified 5 years, 10 months ago by fncll.

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

Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Contributor zymeth25

    (@zymeth25)

    Weird. content=full runs OK in my tests. Can you try enabling WP Debug and see if there are any error messages?

    Thread Starter fncll

    (@fncll)

    I don’t see any errors other than a deprecation warning about a different plugin:

    Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; PiwigoPress has a deprecated constructor in /home/fncllorg/public_html/wp-content/plugins/piwigopress/piwigopress.php on line 190

    I disabled that plugin, and the deprecation notice went away, but the problem remains.

    The interesting thing is, using the WP Debugging plugin to look at the queries being made, and the proper query is being made on the offending page, returning 6 rows, but for some reason there is no output…

    Plugin Contributor zymeth25

    (@zymeth25)

    What happens when you disable all other plugins?

    Thread Starter fncll

    (@fncll)

    On the plus side, I narrowed it down to some conflict with the FeedWordPress plugin.

    Unfortunately, that plugin is critical…and I really don’t get why it is involved at all, since it simply creates posts from RSS feeds. and the posts are “real” posts that are in my post list, editable, etc.

    But that got me thinking: the reading-log posts are all coming in via FeedWordPress…and, indeed, if I choose a different tag with posts that weren’t imported, the full contents work. The problem posts are ones set to the “asides” post format.

    What might be causing LCP to not work with those posts? They show up in my posts list and don’t seem any different than others (see: https://imgur.com/VSH3y36).

    • This reply was modified 5 years, 10 months ago by fncll.
    • This reply was modified 5 years, 10 months ago by fncll.
    Plugin Contributor zymeth25

    (@zymeth25)

    It would be easier to understand if including content=full had no effect but the list, with titles, was still displayed. I don’t have the time to read the FeedWordPress plugin’s code in detail but I skimmed through it and have some ideas:

    • when you add content=full, the part of the LCP plugin’s code that you trigger applies ‘the_content’ filters before returning the post’s content
    • the FWP plugin adds some filters to ‘the_content’
    • this is probably the only possible point of interaction between the two plugins in your case
    • ‘the_content’ filters, when written properly, should never affect the base structure of the list generated by LCP, they should only modify post content to be displayed

    So one last thing I’d like you to try is to use content=yes, see if it works, if it doesn’t: find include/lcp-catlist.php file where you have the LCP plugin installed and delete line 361 from that file. Then let me know if anything changed (while still using content=yes).

    • This reply was modified 5 years, 10 months ago by zymeth25.
    Thread Starter fncll

    (@fncll)

    I assume you meant 362 (return $lcp_content;) since 361 is just a closing brace?

    Using contents=yes shows one post on the page…oddly, the oldest one. This is the same whether I delete line 362 or not.

    I notice something else strange: all three of my test pages have a regular block with text before the shortcode. On both the pages that have content=x, those other blocks get swallowed up and don’t display at all.

    Also, if I don’t specify a category, none of the imported posts show up in the list, including the one post that shows up if content is set to yes, even if I have edited them and set the post format to standard (just in case post format was the issue).

    Here are four minimal test pages showing the issue:

    List with no content: https://fncll.org/lcptest-list/
    List with content=yes: https://fncll.org/lcptest-contents-yes/
    List with content=full: https://fncll.org/lcp-test-contentsfull/
    List with no category specified: https://fncll.org/lcp-test-no-category/

    • This reply was modified 5 years, 10 months ago by fncll.
    Plugin Contributor zymeth25

    (@zymeth25)

    Ah, sorry, I was looking at a newer, development version of the plugin… The line I actually wanted out in v0.83.1 is 349: $lcp_content = apply_filters('the_content', $lcp_content);.

    Thread Starter fncll

    (@fncll)

    Ah, that made a difference. content=yes now shows the posts. Ultimately I would like to show the post contents sans title and “continue reading” links, but this is definitely a step in the right direction: https://fncll.org/lcptest-contents-yes/

    • This reply was modified 5 years, 10 months ago by fncll.
    Plugin Contributor zymeth25

    (@zymeth25)

    I notice something else strange: all three of my test pages have a regular block with text before the shortcode. On both the pages that have content=x, those other blocks get swallowed up and don’t display at all.

    Yes, there’s something weird going on and I think it has to do with ‘the_content’ filters of the FWP plugin. That’s why I need you to test it.

    Also, if I don’t specify a category, none of the imported posts show up in the list, including the one post that shows up if content is set to yes, even if I have edited them and set the post format to standard (just in case post format was the issue).

    This looks like a separate issue, I think while skimming the code of the FWP plugin I found a snippet that does that specifically – removes its posts from such non-specific queries.

    Thread Starter fncll

    (@fncll)

    I think while skimming the code of the FWP plugin I found a snippet that does that specifically – removes its posts from such non-specific queries

    blurgh. It looks like FeedWP development is stalled or abandoned…I just haven’t found anything that I can replace it with, but maybe there’s something out there that would simply import posts from an RSS feed with a few settings for category and tags.

    Plugin Contributor zymeth25

    (@zymeth25)

    Ah, that made a difference. content=yes now shows the posts. Ultimately I would like to show the post contents sans title and “continue reading” links, but this is definitely a step in the right direction!

    Yeah, so that’s what I thought. I recommend contacting the FWP developer(s) and describing the issue (also linking this thread). The filters they apply to ‘the_content’ should not cause such behaviour. There’s nothing bugged on our end so I cannot offer a permanent solution, if you keep that one line deleted, remember you’ll have to delete it every time you update the LCP plugin. Also, interested to see how content=full works with that line deleted.

    Plugin Contributor zymeth25

    (@zymeth25)

    maybe there’s something out there that would simply import posts from an RSS feed with a few settings for category and tags.

    Maybe. I’ve never done any RSS imports in WordPress so can’t help 😉 But yeah switching plugins is the best solution.

    Thread Starter fncll

    (@fncll)

    FYI content=full remains completely blank 🙂

    Thanks for all your time, particularly since it just revealed a flaw in a different plugin. I will work on finding a replacement (and file an issue with FeedWP just in case it comes back to life)!

    Plugin Contributor zymeth25

    (@zymeth25)

    I would like to show the post contents sans title

    Just use no_post_titles=yes.

    Plugin Contributor zymeth25

    (@zymeth25)

    FYI content=full remains completely blank 🙂

    Yeah, because as you can see in lcp-catlist.php we have another call to apply_filters on line 353 but I don’t recommend deleting it.

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

The topic ‘content=full shows nothing’ is closed to new replies.