Gateway Timeout

This topic contains 41 replies, has 2 voices, and was last updated by  Brent Wallace 3 months, 3 weeks ago.

Viewing 15 posts - 1 through 15 (of 42 total)
  • Author
    Posts
  • #12692

    Brent Wallace
    Participant

    Hi.

    I am trying to setup the search. I need to be able to search all of the menu items. i also need to be able to search an iframed page.
    It appears that I need to use the “index table engine”. When I do and I try to create it I get the following message after about 33% finished: Status: 504 Code: Gateway Timeout. Very frustrating!

    How can this be fixed?
    thank you,
    Brent

    #12700

    Ernest Marcinko
    Keymaster

    Hi Brent,

    The problem was that the default iteration limit was to high (25 posts per iteration). This simply overloaded the server. The causes usually indexing complex pages with perhaps lots of shortcodes, filters or even iframe contents. I've changed this iteration limit to 2 and finished the indexing process without the error message: https://i.imgur.com/fAeOrDh.png
    Any further items will be indexed automatically upon creation.

    I read you want to index navigation menu items as well. You might need an additional code for it to work, as navigation items are post types but are much harder to handle in terms of searching, so I was not able to include their support officially yet. Make sure to place this code snippet to the functions.php file in your currently active theme directory (copy from line 3):

    If you need any help with this, then just add temporary FTP details to your ticket, and I will do it for you.

    In addition to the IFRAME content indexing: This is probably one of the most unpredictable features of the plugin, to be honest with you. There are just so many different things one can place into an IFRAME (from simple HTML to all kinds of weird media and so on), therefore it's not an easy job to extract their contents correctly, or in some cases at all. The plugin will try it's best to recognize and extract every relevant information from there, but there is still a chance that some things might be missing.

    Let me know if you need help with the code snippet above, and I hope this information helps you.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #12714

    Brent Wallace
    Participant

    Ernest thank you so much for the prompt reply! And thank you for changing the settings.
    I have no problem with adding the script to the functions. I'll do that later this afternoon and let you know my findings.

    Thanks again! By the way, what country do you live in?
    Have a great day/night.
    Brent

    #12715

    Brent Wallace
    Participant

    I added the script and did a quick test. It appears that it is now searching the menu and they show up but when you click on the links they go to a 404 pages.

    Can you look at that please? Also the iframed page is set as private. Please look for Campbell Team.

    Thank you!
    Brent

    #12716

    Ernest Marcinko
    Keymaster

    Hi Brent,

    I'm located in Slovakia 🙂

    I will probably need temporary FTP in order to be able to debug why those links are broken. Navigation items are problematic, as I mentioned earlier. I might be able to figure it out though, and construct some kind of permanent fix to the functions.php file.

    The page with the iframe might be more problematic. I've looked it up, but one issue is that the frame URL leads to a password protected page, so in best case scenario the plugin could only extract the “password” word out of that page.
    If that is not doable, there is a much simpler solution in my opinion. You can actually enter additional search keywords for each page, on the page editor: https://i.imgur.com/idY1lqf.png
    So, instead of relying on the search to parse and find whatever it can, you could simply just enter the keywords to look for into that box – it's worth considering. In that case, you could also bypass using the index table engine, I see you have around 1000 posts, using the regular engine won't make too much difference, I believe.

    Anyways, I won't be online too much in the next couple of days (easer holydays), but I will definitely check the support forums when I can. If you can leave temporary FTP access, I will definitely look at it tomorrow, or sunday morning, to see if I can fix that nav menu thing.

    PS.: please have a back-up of everything on your site, just in case. I have never broken anything on anyone's site, but it's much safer for the both of us.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #12717

    Brent Wallace
    Participant
    You cannot access this content.
    #12725

    Ernest Marcinko
    Keymaster

    Hi Brent,

    I believe I was able to fix the nav menu URL problem so far. I haven't tested with all cases, but so far all menu items I've tried it worked. The solution is added to the bottom of the functions.php in your child theme directory. That actually might be a permanent way of solving this once and for all, so if it works, then I will add it to the upcoming release.

    I will be back on tuesday, then I check the iframe related issue as well.

    Unfortunately I'm not available for custom jobs, maintaining my work on codecanyon and on wordpress.org + the support takes all my time and dedication. I can however recommend wpkraken.io for custom jobs. It's a team of WordPress developers from codecanyon, not freelancers. So far I heard no complaints about them.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #12727

    Brent Wallace
    Participant

    Hey Ernest. Thanks for the help! And the recommendations.
    It does appear that the links now work but I do have an issue that several of them are offsite and need to be opened in a new window. NOT ALL but the ones that have been selected in the WP menu to open in a new window. If this could be fixed that would be awesome!

    Thank you in advance for looking at the iframe issue.

    Brent

    #12728

    Brent Wallace
    Participant

    Ernest the other issue that I see is that url links that go nowhere (#) are showing up in the search results also. It shouldn't be too fifficult to have the search ignore the links that are used as sub-categories in the menu.

    EXAMPLES:
    ADHD
    Allergies
    Autoimmune
    etc.
    etc.

    These are not actual links. Please look at the menu layout. Do you follow?

    Thank you again, hope you're having a good Easter.
    Brent

    #12729

    Brent Wallace
    Participant

    I found the setting to open all in a new window!
    That'll work.

    #12743

    Brent Wallace
    Participant

    Any luck with the iframes?

    I have another page that is also password protected with a simple password that I need to add to the site also.

    Thank you!

    #12744

    Brent Wallace
    Participant

    My other issue is removing links that go to # from the results.

    #12745

    Ernest Marcinko
    Keymaster

    Hi!

    I was able to check on both issues. The link problem was easy to fix, I just simply added one additional line to the previous code to remove results which has empty links or link to a hashtag.

    The iframe indexing is actually doing it's job, however the problem is when the server tries to open the link for viewing, then the remote server returns a 403 error, which means that the destination URL it's forbidden to access. That I cannot fix, as it's not a plugin related issue, but something with the server where the link points to – I guess it has an access restriction based on browsers or there might be one or more redirections involved (which is even worse), I can't tell based on the error message.
    You could try to investigate this, but I'm not sure if it's worth the time. I have a fair amount of experience with CURL and site parsing, and these issues are extremely hard to debug, even more if the problem is actually on the destination server. If there is some kind of redirection involved, then it's almost certainly a dead-end, server side URL parsing is not as simple as viewing a URL in a browser unfortunately.
    It's much simpler to just simply enter the keywords to the box below the page where the iframe is contained, in my honest opinion.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #12747

    Brent Wallace
    Participant

    Hi Ernest.

    Thank you! No problem with the password protected iframe, I thought it would be quite a stretch.
    The only issue I see with the hash tag (#) URL's is that there are some links that go to an anchor. (#Cancer) as an example. Can we tweak the functions file to filter these out also?

    Thank you again so much!
    Brent

    #12748

    Brent Wallace
    Participant

    Also is there a setting to load more results than the original 10?

Viewing 15 posts - 1 through 15 (of 42 total)

You must be logged in to reply to this topic.