Giter VIP home page Giter VIP logo

Comments (24)

TobiasBg avatar TobiasBg commented on June 1, 2024

Hi,

thanks for your question, and sorry for the trouble.

I can confirm that the search integration is not working on your site, but unfortunately, I don't see why :-(

You are right with the assumption that content that is rendered by Shortcodes is not searched by default. To work around this, TablePress has its own search integration. This basically works by intercepting the search query, searching through all tables, and then extending the actual search to also search for Shortcodes that contain the search term.

Unfortunately, other plugins or the theme can sometimes disturb this process. Can you therefore please try again after temporarily deactivating all other plugins and after switchting to a WordPress default theme like Twenty Sixteen? That way, we can find what's causing this.

Regards,
Tobias

from tablepress.

JacobDB avatar JacobDB commented on June 1, 2024

Sure thing, I'll check it out Monday when I'm back in the office. Thanks much :)

from tablepress.

TobiasBg avatar TobiasBg commented on June 1, 2024

Did these ideas help, @revxx14?

from tablepress.

JacobDB avatar JacobDB commented on June 1, 2024

Sorry I never followed up on this! I was able to get it working with the following:

add_filter('relevanssi_content_to_index', 'rlv_table_check', 10, 2);
add_filter('relevanssi_excerpt_content', 'rlv_table_check', 10, 2);
function rlv_table_check($content, $post) {
    $additional_content = get_post_meta( $post->ID, 'additional_content', true );

    if ($additional_content) {
        $additional_content_expanded = do_shortcode($additional_content);
        $content .= " " . $additional_content_expanded;
    }

    return $content;
}

Not sure it's the most efficient way to do this (I should probably be filtering with regex for the shortcodes specifically), but it works.

from tablepress.

TobiasBg avatar TobiasBg commented on June 1, 2024

Hi,

ah, you were using another plugin that also integrates into the search :-) That explains things a bit. Good to hear that you found a solution!

Best wishes,
Tobias

from tablepress.

Robyn-VS avatar Robyn-VS commented on June 1, 2024

Hi,

I'm having the same issue with the search function... JacobDB, did you add that snippet of code to your functions.php file? I'm a designer, not a developer and trying to make sure the website I'm building searches the Tablepress table conten for my client...

Thanks in advance for your help!
Robyn :)

from tablepress.

TobiasBg avatar TobiasBg commented on June 1, 2024

Hi @Robyn-VS,

are you having these issues on a "standard" site or are you maybe using a special search plugin on your site?

Best wishes,
Tobias

from tablepress.

JacobDB avatar JacobDB commented on June 1, 2024

@Robyn-VS yea, that went in my functions.php. That particular snippet is for expanding shortcodes within a custom field, and adding the results to the Relevannsi indexing process.

from tablepress.

Robyn-VS avatar Robyn-VS commented on June 1, 2024

Hi @TobiasBg, having these issues on the standard site, I'm not using a special search plugin... I am using it with woo commerce though, I've added tables in the product short descriptions.

And thanks @JacobDB - I'm happy to add the relevannsi plugin, if that will make it work! What kind of custom fields would that snippet check?

from tablepress.

TobiasBg avatar TobiasBg commented on June 1, 2024

Hi @Robyn-VS,

thanks for the details! This is a different issue then. You will basically have to find out how to make those "product short descriptions" searchable by WordPress. Depending on how they are stored internally, they might not even be searchable to begin with. Then, if they are searchable, you'd have to make them parse Shortcodes so that those are searched.
As this has shown to be tricky for regular posts and pages (for which TablePress offers native support), this will probably not be easy :-/ Checking out third-party search plugins might therefore be a better option.

Regards,
Tobias

from tablepress.

Robyn-VS avatar Robyn-VS commented on June 1, 2024

Hi @TobiasBg,

I thought that might be the case :-/ if I find a solution, I'll let you know! Might try modifying @JacobDB 's snippet to include the product short descriptions... Although hopefully there's an easier solution out there for me! Thanks for your quick responses :)

from tablepress.

zhumakz avatar zhumakz commented on June 1, 2024

Hey. I have a very large table and therefore a very long query processing. Loads the table on page and it is necessary to wait 5 - 7 seconds. Then everything works. How can I disable the loading of the entire table and only include the search?

from tablepress.

TobiasBg avatar TobiasBg commented on June 1, 2024

Hi @zhumakz,

I'm afraid that that is not possible at the moment. The search works with JavaScript and this means that all data has to be transferred to the browser before a search can be made :-(

Regards,
Tobias

from tablepress.

NidhinAS avatar NidhinAS commented on June 1, 2024

Hi,

I am using tablepress for my website. I have colored even row and odd row separately. But when I include the search option and reduce the row limit some table showing the color properly with proper row limit and search options but some table not showing the search option and colors for the row.

from tablepress.

TobiasBg avatar TobiasBg commented on June 1, 2024

Hi @NidhinAS,

Can you please post a link to the page with the table where this problem happens, so that I can take a direct look? Thanks!

Regards,
Tobias

from tablepress.

NidhinAS avatar NidhinAS commented on June 1, 2024

Hi... thanks for your reply.... i did not host my site.... i cannot post the link.... some tables showing the search option... I have added even row color and odd row color.... this is not working in tables when I tick the 'Use the following features of the DataTables JavaScript library with this table' option.

from tablepress.

TobiasBg avatar TobiasBg commented on June 1, 2024

Hi @NidhinAS,

ok, one possible cause for this could be that your table contain #rowspan# or #colspan# to combine/merge cells. This is not compatible with the JavaScript feature. If you are using these, you must remove them from the table, if you want the JavaScript features.

Regards,
Tobias

from tablepress.

NidhinAS avatar NidhinAS commented on June 1, 2024

Thank you ....yes i have used rowspan and colspan.....one more doubt... i have reduced table width but the search option and pagination appears at the right side of page...is there any way to align with the table width.

from tablepress.

TobiasBg avatar TobiasBg commented on June 1, 2024

Hi @NidhinAS,

Can you please post a link to the page with the table where this problem happens, so that I can take a direct look? Thanks!

Regards,
Tobias

from tablepress.

NidhinAS avatar NidhinAS commented on June 1, 2024

Hi.. thank you for your attention... my site is not publicly available right now... I have reduced table width in a page.....but search and pagination appears right side of table... search and pagination not aligned to the table width... if the table width is page size, it seems ok...
Untitled

from tablepress.

TobiasBg avatar TobiasBg commented on June 1, 2024

Hi @NidhinAS,

ok, can you please add this to the "Custom CSS" textarea on the "Plugin Options" screen of TablePress:

.dataTables_wrapper .tablepress {
  width: 100% !important;
}

Regards,
Tobias

from tablepress.

NidhinAS avatar NidhinAS commented on June 1, 2024

thank you for your immediate reply.... i have to keep the table always 100% width.....if the table width reduced....search and pagination not compacted to the table width...

from tablepress.

TobiasBg avatar TobiasBg commented on June 1, 2024

Hi @NidhinAS,

so you actually want a smaller width? And not 100%? Then, you'd have to reduce the width of the container, like

#tablepress-123_wrapper {
   width: 500px; 
}

Regards,
Tobias

from tablepress.

NidhinAS avatar NidhinAS commented on June 1, 2024

thank you @TobiasBg ....its workiing..... thank you

from tablepress.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.