• Resolved rpbhatt

    (@rpbhatt)


    I need a ‘Rescan All Links’ button which will rescan all the current broken links again after clicking on the button. It will be on on ‘wp-admin/tools.php?page=view-broken-links’.

Viewing 9 replies - 16 through 24 (of 24 total)
  • Thread Starter rpbhatt

    (@rpbhatt)

    I’m using version 1.11.21

    Plugin Support Williams – WPMU DEV Support

    (@wpmudev-support8)

    Hi @rpbhatt

    In previous version of the plugin and new one set to use “Local engine” the link checks are happening based on cron according to the setting of the “Check each link” option in “General” settings.

    Additionally, when the link is edited via the plugin (using option in on links list) it would be checked too.

    As for occurrences list the old version unfortunately does show only one location.

    However, the old versions of the plugin do not and will not receive updates and changes. In new versions (2.0 and up) the “old” plugin is still included but it’s a “legacy engine” and only receives the security and compatibility fixes – the feature/functionality lists are closed.

    This particular issue has been addressed in current plugin with Cloud engine which shows all instances of links. If you update the plugin and switch to Cloud engine, link list will contain all occurrences of links. Older versions of the plugin will not receive any changes related to its features/functionality.

    Kind regards,
    Adam

    Thread Starter rpbhatt

    (@rpbhatt)

    Can you please guide me how can I achieve this without updating the plugin. Please tell me which file and what code I need to change for this. My version is 1.11.21.

    Plugin Support Williams – WPMU DEV Support

    (@wpmudev-support8)

    Hi @rpbhatt

    As I mentioned, neither old versions of the plugin nor current “Local” engine are not and will not be receiving any functional changes/updates.

    Changing older plugin to achieve that requires quite a bit of custom coded significant changes in plugin core code and this is outside of the scope of this support.

    I’m very sorry but we can’t provide solution for that. If you need such changes to be made in older plugin or a Local engine of new one, you may need to consider hiring a 3rd-party developer, I’m afraid. Other way is only to switch to Cloud engine in a newest version of the plugin.

    Kind regards,
    Adam

    Plugin Support Nithin – WPMU DEV Support

    (@wpmudevsupport11)

    Hi @rpbhatt,

    Since we haven’t received any new questions from you in a while, we will consider this issue resolved for now. Please feel free to reopen this thread if you need any more assistance.

    Regards
    Nithin

    Thread Starter rpbhatt

    (@rpbhatt)

    Broken link checker plugin does not list a link if it is on multiple pages.

    If there is the same broken link on 10 pages (or any cpt), then it should be listed 10 times but it’s listing 1 time. I need to fix this.

    I’ve total 6 broken links and 4 among them are same links so only 3 are showing ie; among 4 same links, showing 1 only.

    I did change on ‘link-query.php’ as per below code . By doing this, showing that 6 links are there but ‘Link Text’ and source are not correct.

    
    function get_links( $params = null ) {
    global $wpdb; /** @var wpdb $wpdb */
    
        if ( ! is_array( $params ) ) {
            $params = array();
        }
    
        $defaults = array(
            'offset'               => 0,
            'max_results'          => 0,
            'load_instances'       => false,
            'load_containers'      => false,
            'load_wrapped_objects' => false,
            'count_only'           => false,
            'purpose'              => '',
            'include_invalid'      => false,
            'orderby'              => '',
            'order'                => '',
        );
    
        $params = array_merge( $defaults, $params );
    
        //Compile the search-related params into search expressions usable in a WHERE clause
        $criteria = $this->compile_search_params( $params );
    
        //Build the WHERE clause
        if ( ! empty( $criteria['where_exprs'] ) ) {
            $where_expr = "\t( " . implode( " ) AND\n\t( ", $criteria['where_exprs'] ) . ' ) ';
        } else {
            $where_expr = '1';
        }
    
        //Join the blc_instances table if it's required to perform the search.
        $joins = '';
        if ( $criteria['join_instances'] ) {
            $joins = "JOIN {$wpdb->prefix}blc_instances AS instances ON links.link_id = instances.link_id";
        }
    
        //Optional sorting
        if ( ! empty( $criteria['order_exprs'] ) ) {
            $order_clause = 'ORDER BY ' . implode( ', ', $criteria['order_exprs'] );
        } else {
            $order_clause = '';
        }
    
        if ( $params['count_only'] ) {
            // Only get the number of matching links.
            $q = "
                SELECT COUNT(links.link_id)
                FROM
                    {$wpdb->prefix}blc_links AS links
                    $joins
                WHERE
                    $where_expr";
    
            return $wpdb->get_var( $q ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
        }
    
        // Select the required links.
        $q = "SELECT
                 links.*
    
              FROM
                 {$wpdb->prefix}blc_links AS links
                 $joins
    
              WHERE
                 $where_expr
    
               {$order_clause}"; 
    
        // Add the LIMIT clause
        if ( $params['max_results'] || $params['offset'] ) {
            $q .= sprintf( "\nLIMIT %d, %d", $params['offset'], $params['max_results'] );
        }
    
        $results = $wpdb->get_results( $q, ARRAY_A ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
        if ( empty( $results ) ) {
            return array();
        }
    
        // Create the link objects
        $links = array();
    
        foreach ( $results as $result ) {
            $link = new blcLink( $result );
            $links[] = $link;
        }
    
        $purpose = $params['purpose'];
        /*
        Preload instances if :
            * It has been requested via the 'load_instances' argument.
            * The links are going to be displayed or edited, which involves instances.
        */
        $load_instances = $params['load_instances'] || in_array( $purpose, array( BLC_FOR_DISPLAY, BLC_FOR_EDITING ) );
    
        if ( $load_instances ) {
            $link_ids      = array_keys( $links );
            $all_instances = blc_get_instances( $link_ids, $purpose, $params['load_containers'], $params['load_wrapped_objects'] );
            //Assign each batch of instances to the right link
            foreach ( $all_instances as $link_id => $instances ) {
                foreach ( $instances as $instance ) { /** @var blcLinkInstance $instance */
                    $instance->_link = $links[ $link_id ];
                }
                $links[ $link_id ]->_instances = $instances;
            }
        }
    
        return $links;
    }

    Please specify if I need to change anything more on above code on an any other code of any files. Please specify what I need to change to fix this. I need to change on the older version of the plugin as I can’t update the plugin and can’t use cloud as I’ve already changed a lot on the older version of the plugin.

    Plugin Support Jair – WPMU DEV Support

    (@wpmudevsupport15)

    Hi @rpbhatt,

    Please be informed that we have forwarded the issue of links only being listed once instead of per occurrence on pages to our BLC team to be fixed in the upcoming releases.

    Kind regards,
    Zafer

    Thread Starter rpbhatt

    (@rpbhatt)

    Hi,

    I’ve main source event pages and have multiple individual instances of recurring events. Broken link of main source event page is showing but broken links of individual instances are not showing which needs to be shown. For example, main source event link is domain/events/test-events/ and one individual instance is domain/events/test-events/?occurrence=2023-12-06 and here broken link of domain/events/test-events/ is showing but broken link of domain/events/test-events/?occurrence=2023-12-06 is not showing. Please specific what code I need to change to fix this.

    Plugin Support Williams – WPMU DEV Support

    (@wpmudev-support8)

    Hi @rpbhatt

    We understand the problem but please also understand that we are not able to help with old and outdated version of the plugin.

    We need to focus on current and up to date versions and we can’t add new features or fix bug in severely outdated releases. Plugins should always be kept up to date unless specifically instructed to be downgraded (e.g. due to specific bug).

    Furthermore, this particular issue is not simply a matter of just “fixing a line or two” of the code but making more significant changes to the plugin – which would also need to be first analyzed by developers.

    It basically means we cannot provide you with solution or suggestions on what to change.

    The issue is already reported as a bug to developers and here is what will happen:

    1.they will analyze that (and I don’t have ETA on this)
    2.then they’ll work on a code to fix this and both analysis and code work will be done in reference to current (and not old) version of the plugin
    3. and will implement the code in one of future updates of the plugin (but not in old version) – on which I don’t have ETA either.

    Once that’s done the way to fix that will be to update the plugin. We will not make changes to already released previous version.

    And we cannot tell you “what code you need to change to fix it” because

    a) we do not know that at this point – until developers will analyze the bug and start working on the code fix
    b) and even after the fix is released update version of the plugin – there’s no guarantee that the same code fix will be possible to apply to old version.

    I’m really sorry but we simply cannot guarantee support and maintenance for outdated plugins and provide custom solutions / fixes for them.

    Kind regards,
    Adam

Viewing 9 replies - 16 through 24 (of 24 total)
  • The topic ‘Need a Rescan Button’ is closed to new replies.