• I really like this plugin, along with The Events Calendar Shortcode & Block Pro, which is what I use to display the calendar on pages I create. The builtin “/events” page displays something that the shortcode does not: the search box at the top with the “Find Events” button. I just tried using this for the first time, and as far as I could tell, it did nothing. Using Chrome Developer Tools, I could see that clicking the Find Events button resulted in 403 errors reported in the console.. Here are the details. And I get the exact same error when clicking any of the other three buttons (List, Month, Day). The reason is that the site has the Force Login plugin activated. I can’t remember the details on this, but I think there is some way that you can make XHR requests that will pass along the cookies from the requestor, which should solve this problem, since the window making the request is logged in to WordPress.

    So I verified that deactivating the Force Login plugin gets rid of the errors. And the List, Month, and Day buttons then behave as they should. However, the Find Events button still doesn’t seem to work. If I enter words from event titles or descriptions in the search box, the result is always “There were no results found for?“whatever-I-entered”. Is the feature supposed to search both titles and text from events? If not, then what does it search? Is it case-sensitive?

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter sootsnoot

    (@sootsnoot)

    Well, I tried editing file the-events-calendar\src\resources\js\custom-tables-v1\ct1-upgrade.js and just before the request.send() at line 105, I added request.withCredentials = true; and then I minified it, replacing the-events-calendar\src\resources\js\custom-tables-v1\ct1-upgrade.min.js. But unfortunately, that didn’t help, I’m still seeing the same error in the devtools console, and I don’t know why. Can you fix it correctly? I certainly don’t want to leave Force Login deactivated. And then when you eliminate the error, take a look at why the Find Event button doesn’t find strings that appear in the event title or text?

    Plugin Support Atousa Najafi

    (@atousanajafi)

    Hi @sootsnoot,

    Do you experience this issue when you add shortcodes using The Events Calendar Shortcode & Block plugin? Please note that this plugin was not created by our team and for issues related to it, you’d need to contact the plugin author. Besides that, the Force Login plugin hasn’t been updated over the past year, which increases the probability of causing conflicts with other plugins.

    Regarding the search functionality, do you experience this issue with the main calendar page provided by TEC? Could you share the direct URL to the page you’re having issues with? Please do not share any credentials, this is for us to follow the WordPress Forum Guidelines.

    Thread Starter sootsnoot

    (@sootsnoot)

    As I explained, the problem occurs only with the “/events” slug which is predefined by this plugin. It does not affect the shortcode since the shortcode does not display any of the four broken buttons (Find Events, List, Month, Day).

    Regarding the Force Login plugin, that’s a pretty simply plugin that checks is_user_logged_in(), and if so does nothing, but if not (and the request is not for the login page), then returns a 403 (forbidden) status and displays the login page. You can see in the devtools console output I provided that clicking any of those 4 buttons results in a 403 error. And as I also said before, that would be expected if the The Events Calendar did not take care to provide the logged-in cookies in the XHR request.

    I already provided the exact url showing the problem in my first post – but of course that will take you to the login page, since you’re not logged in and the Force Login plugin is activated. I could temporarily deactivate Force Login so you can investigate why Find Events always returns Not Found. Or I could send you login credentials so you could login and investigate why clicking any of the 4 buttons has no visible effect unless using devtools where it shows the 403 error.

    Please let me know how to proceed, thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.