Forum Replies Created

Viewing 15 replies - 1 through 15 (of 18 total)
  • Thread Starter wpusr007

    (@wpusr007)

    Hello Rogier, no I havent changed anything on that front since the VM was built in Nov 2021… Same cert and same apache config.

    The only thing I did was the system update (dnf update) last week thinking it may help with the slowness and the “Gateway Timeout” but it was not related after all…

    My only explanation is that curl got updated and now doesnt tolerate self signed certs. I will ignore that for now, but it would be nice to perhaps mark notifications/alerts as “acknowledged” in the checks so they do not remain active and cause the “Should be improved” and “THis site has critical issues” warning… Think of Freenas/Truenas here…

    More an improvement idea than anything else ??

    I will still look into the lets encrypt thing to make things cleaner.

    Thread Starter wpusr007

    (@wpusr007)

    Thanks guys,

    will do!

    But I’m still trying to figure out why this problem showed up today, for no reasons…Unless curl got updated yesterday and no longer tolerates self signed certs without throwing a tantrum?

    As for the cert used to access this specific VM (its running on Rocky Linux which is a drop-in replacement for the defunct Centos), why is it used by curl in the first place? I mean why is curl complaining about the cert used on this machine if it is not trying to access “localhost”, or is it?

    Is there a way to see (verbose) what WordPress is trying to accomplish with CURL which would generate these errors? IMO the health page should provide more than just

    Error: [] cURL error 60: SSL certificate problem: self signed certificate

    Sorry I’m just trying to make sense of this and understand how these things are working together.

    Thread Starter wpusr007

    (@wpusr007)

    Okay, so I take that something in WP’s code got updated to do this check because like I said, I haven’t seen these errors until today…

    This WP instance is more or less offline and only accessed by me. Purchasing a real SSL cert sounds overkill and unnecessary…

    Thread Starter wpusr007

    (@wpusr007)

    Hello James,

    Thanks for your reply! Using the Health Check plugin, I may have found the issue: Pods Alternative Cache plugin. Once I removed it, the site got a bit faster (AFAIK) and the Gateway Error “seems” to be gone (I put seems in quotes because each time I think the problem is fixed it reappears.. ??

    For now lets see if it comes back.

    Unfortunately, I am stuck with more problems, albeit minor ones but I dont understand what they mean.

    In the Site Health page, I now see the following errors:

    The REST API encountered an error
    The REST API is one way WordPress, and other applications, communicate with the server. One example is the block editor screen, which relies on this to display, and save, your posts and pages.
    
    The REST API request failed due to an error.
    Error: [] cURL error 60: SSL certificate problem: self signed certificate
    Your site could not complete a loopback request
    Loopback requests are used to run scheduled events, and are also used by the built-in editors for themes and plugins to verify code stability.
    
    The loopback request to your site failed, this means features relying on them are not currently working as expected.
    Error encountered: (0) cURL error 60: SSL certificate problem: self signed certificate

    They both seem to be caused by CURL problems, but I dont understand what has changed to cause this. FYI this WP site is running on a headless machine in my home and WordPress is NOT accessible from the internet, only from LAN. It uses a self signed SSL cert to “secure” apache but its been like that since I installed WP about 7 months ago and never saw anything like that before…. I did run a OS update last week thinking it might help (which it didnt) so perhaps CURL got updated and its having issues now?

    How do I troubleshoot this? What is CURL trying to do to cause these errors??

    • This reply was modified 2 years, 7 months ago by wpusr007.
    Thread Starter wpusr007

    (@wpusr007)

    Hello Jory,

    thanks for the reply! Ehhhhmmmm let me ask you a few things if you dont mind.

    1. I agree writing directly in the MySQL/MariaDB database is much mnore efficient but will it cause issues in WP provided the field (price) I want to periodically update is indeed only a PODS number field without anything else in it (no dollar signs, etc). Just a plain old decimanl number

    2. I will research on how to do this because while I do have a minimal experience and knowledge with administration of MariaDB I have no experience with directly writing/reading to/from a SQL DB…. Is there anything to do before writing in the DB? Like putting WP in maintenance mode, etc or can I simply run the script and update the values in the DB?

    3.

    You do need to use the functions for relationships and attachments (files) so that the connections are made correctly though.

    You lost me here. I feel its related to question 2 (more or less..)

    • This reply was modified 2 years, 7 months ago by wpusr007.
    • This reply was modified 2 years, 7 months ago by wpusr007.
    Thread Starter wpusr007

    (@wpusr007)

    Great to know support for pods is coming!

    Thread Starter wpusr007

    (@wpusr007)

    Thanks guys, I will post on the FG Drupal to WP plugin subforum to ask more questions about their plugin before I purchase the premium version.

    Thread Starter wpusr007

    (@wpusr007)

    Excellent, I will go through the training material and post back if something is not working!

    Thanks!

    Thread Starter wpusr007

    (@wpusr007)

    Jory, yes it was a missing comma…. Thanks for pointing it out! Is it possible to “loop” this short snippet for each value in the pods relationship field “genres”? Right now, I tricked the code to use the page title (which corresponds to the genres) as the meta_value for the query, so this snippet can be reused on each different pages (as long as their titles matches what’s in the Pods genre field!):

    <?php
        $title = html_entity_decode( get_the_title() );
        $posts = get_posts(array(
            'post_type' => 'book',
            'meta_key' => 'genres',
            'posts_per_page' => -1,
            'meta_value' => $title
        ));
    echo count($posts);
    ?>

    It works well, but I’d like to output a small table like this:

    Fiction: 25
    Sci-Fi: 29
    Sciences: 15
    Politics: 35

    So basically I’d like to use an array for meta_value instead of a “static” value (like the page title). Retrieving the contents of the “genre” relationship field of the “book” pods has proven more complicated than I expected. Pretty much everything I tried hasn’t worked yet. Is it possible?

    For the php shortcode plugin, I understand but I could not get a way to execute PHP code inside of a page… This WP site is offline (only used on my LAN for personal/family usage).

    Looking forward to your reply! Have a great day and sorry for being to WP primitive ??

    Thread Starter wpusr007

    (@wpusr007)

    Hey Jory,

    So you’re right. The 'posts_per_page' => -1, is sufficient to do the job, but it must be entered before the meta_value line otherwise I get

    Parse error: syntax error, unexpected ''posts_per_page'' (T_CONSTANT_ENCAPSED_STRING), expecting ')' in /mnt/data/wordpress-data/wp-content/plugins/insert-php-code-snippet/shortcode-handler.php(97) : eval()'d code on line 6

    So the code order matters…. Good to know! now its working as expected!

    Thanks again!

    Thread Starter wpusr007

    (@wpusr007)

    @tobiasbg : The following PHP snippet, converted to a shortcode (or via Insert PHP Code Snippet plugin which creates a shortcode for a PHP snippet) will allow to retrieve the number of posts in a specific Pods and can be used inside of a tablepress table and allow to do a dynamic SUM in the table!

    <?php
    $count_posts = wp_count_posts( 'pod_name' )->publish;
    echo $count_posts;
    ?>

    I am using your “DataTables Buttons” plugin (EXCELLENT!!!) and when exporting the table to a PDF file, I am wondering if it is possible to do the following:

    -Print the table description and name BEFORE the table?
    -Print a text footer AFTER the table?
    -Insert a shortcode (or something else) to print the export date and time (something like “Printed by Tobias on Dec. 28, 2021 at 04:06”)?

    • This reply was modified 2 years, 10 months ago by wpusr007.
    Thread Starter wpusr007

    (@wpusr007)

    @pdclark : Very nice! The php code and the function “wp_count_posts” indeed works well in a shortcode.

    This shortcode allowed to retrieve the number of posts in the Pods and perform the “dynamic” sum in the tablepress table!

    Thanks!!!!

    Thread Starter wpusr007

    (@wpusr007)

    Hello Jory,

    Do you know a simple shortcode or other method to simply retrieve the number of posts in a specific Pod?

    I have created a table using tablepress and the plugin Pods Tables which grabs the pod entries in a specific pods and populate a tablepress table. Quite fantastic IMO.

    I am trying to simply do a SUM on a column of that table, but because the number of rows of that table changes depending on the post count in Pods, tablepress and the Pods Tables plugins cannot handle “dynamic” data so what I want to do is currently “impossible”…

    If I could simply have a shortcode that would output the number of posts in the pod, I could use something like:

    =SUM(F1:F([pods-data pods="book" post_count]))

    which would give

    =SUM(F1:F84)

    if there are 84 posts in the pods “book”…

    Is this possible?

    Thread Starter wpusr007

    (@wpusr007)

    Hello Tobias,

    No worries, there is no troubles at all! ??

    I installed your plugin for the shortcode before formulae. However, I found that the shortcode

    [table-info id=1 field=number_rows /]

    returns 1 (or 2 if I use format=raw in the shortcode) because the table indeed has only 1 row (excluding the header). The table is built with only one row and using Pods magic tags in the table cells (using TablePress Extension Pods tables). The table dynamically adjusts (number of rows) depending on how many entries there are in the pod. There may be an incompatibility between tablepress and this plugin.

    The shortcode seems to retrieve the number of rows from the table before it is filled by the “Pods tables” extension hence returning the number of the “virgin” table and not the table that is displayed on the page….

    Unfortunately because of this “bug”/error/issue, I cannot try what you suggested…

    • This reply was modified 2 years, 11 months ago by wpusr007.
    Thread Starter wpusr007

    (@wpusr007)

    @pdclark : Then I must not be understanding how the Pods Item-list block works. What is Pagination if its not what I’m trying to do?

    FacetWP is only paying AFAIK and IMO very expensive for a simple website only on LAN (not on the internet per-se).

    I thought about creating separate pages for each author, etc to re-create the filters I want to implement, but its gonna get real messy and become cumbersome quick… Any other idea from the experienced users?

    I’m surprised what I want to do is not feasible out of the box with Pods as if I understand well, Pods was created to provide a taxonomy system for WP posts.. I may be wrong, my mileage is very limited with WP! ??

    • This reply was modified 2 years, 11 months ago by wpusr007.
Viewing 15 replies - 1 through 15 (of 18 total)