Home › Forums › Calendar Products › Event Aggregator › Error: "Your search returned no results. Please adjust your search."
- This topic has 11 replies, 3 voices, and was last updated 7 years, 11 months ago by Support Droid.
-
AuthorPosts
-
May 5, 2016 at 1:19 pm #1111213DavidParticipant
I’m having the same problem as the person in the following thread link, but the answer has a link that requires me to sign in to something to view the answer…. Can you give me some help here?
https://theeventscalendar.com/support/forums/topic/ical-import-failed-events-not-showing/
May 6, 2016 at 10:23 am #1111573AndrasKeymasterHi David,
Sorry for having a problem and thanks for reaching out.
Can you specify which link asks you to log in? I might be able to help you with that.
Cheers,
AndrasMay 10, 2016 at 12:21 pm #1112856DavidParticipantThis one:
“By adding the following snippet to your WordPress theme’s functions.php (and removing it once you are done): https://tribe.slack.com/files/nico/F0PMGPVD0/clear_deleted_events.php”
May 10, 2016 at 12:47 pm #1112876AndrasKeymasterHi David,
The public access to that snippet must have been removed. So let me paste it in here for you.
<?php
/*
* Deletes the saved copy of "deleted" events generated by iCal Importer
* This allows you to re-import events. The script deletes 50 instances per page load
*/
$posts = get_posts( array( 'numberposts' => 50, 'post_type' =>'deleted_event') );
if (!empty($posts)) {
foreach ($posts as $post) {
wp_delete_post( $post->ID, true);
}
} else {
echo 'Done deleting!';
}
Copy-paste this in your themes (child-themes) functions.php file.
Let me know if this helps solve your issue.
Cheers,
AndrasMay 10, 2016 at 12:49 pm #1112878DavidParticipantSo I just paste this snippet and it will allow to re-import my Google Calendar (iCal link)? It keeps saying that no entries are found since I deleted and tried re-importing.
May 10, 2016 at 1:00 pm #1112889DavidParticipantAnd where in the functions.php file should this be pasted? Because I keep getting this error after pasting it (beginning or end of file):
Parse error: syntax error, unexpected ‘<‘ in …visitpbc.com/wp-content/themes/Avada/functions.php on line 14
Parse error: syntax error, unexpected ‘<‘ in …visitpbc.com/wp-content/themes/Avada/functions.php on line 578
May 10, 2016 at 1:55 pm #1112923AndrasKeymasterHello again,
You should paste the code after the opening <?php tag in your functions.php, and make sure there is only one opening <?php tag in the file.
Your old events should be deleted and removed from the trash. Then the above code will delete the entries from the database.
You can find a bit more on this in the following thread, where we posted this solution as well, and that worked for the customer.
Please let me know if this worked.
Cheers,
AndrasMay 10, 2016 at 2:15 pm #1112934DavidParticipantOk, done! But now it shows “Done deleting!” at the top of my page…
May 10, 2016 at 2:19 pm #1112936DavidParticipantAnd now I get this when I try to import from my iCal link:
“The server responded with a malformed response. Please see the JS console for more information.”
May 11, 2016 at 10:55 am #1113339DavidParticipantIt is now alternating between the malformed response error and “Your search returned no results. Please adjust your search.” Nothing is working here. Please help.
May 11, 2016 at 2:39 pm #1113456AndrasKeymasterHi David,
I’m sorry this is taking so long to solve, but I’m going to help you get this fixed.
There was an error in the code I shared with you which I was not aware of. I apologize. Please remove the code I shared with you before, and instead add this:
function del_deleted_events () {
$posts = get_posts( array( 'post_type'=>'deleted_event', "posts_per_page" => 50, 'post_status' => 'trash', ) );
if (!empty($posts)) {
foreach ($posts as $post) {
wp_delete_post( $post->ID, true);
}
echo '<p style="background-color:yellow;z-index:1;text-align:right;">50 deleted events removed, refresh again.</p>';
} else {
echo '<p style="background-color:yellow;z-index:1;text-align:right;">Done deleting!</p>';
}
}
add_action( 'admin_init', 'del_deleted_events' );
Now whenever you visit an admin page, 50 deleted events will be deleted. You will see a message accordingly at the top.
When all are removed you will see the “Done deleting!” message. After this please try importing again.
Again, I’m sorry this is taking so long and requiring you to do so much extra work.
Let me know if this helps solve your issue.
Cheers,
AndrasMay 26, 2016 at 9:35 am #1119180Support DroidKeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
AuthorPosts
- The topic ‘Error: "Your search returned no results. Please adjust your search."’ is closed to new replies.