Food Search Not Working
HealtheSS
Posts: 6 Member
When I search for a certain food and hit the button that says Add Food to Diary, it takes me to a page that says: Page Not Found. I've cleared my cache, but it still is not working. Any suggestions?
2
Best Answers
-
Please reach out to our dedicated support team for assistance by visiting https://myfitnesspal.zendesk.com/hc/en-us or emailing directly to support@myfitnesspal.com0
-
Found a workaround. Instead of using the "Add Food" links in the diary that take you to /food/search and will ultimately fail, click on the "Database" link in the top sub-menu under the "Food" menu, then search and add your foods there.
This will hit an endpoint that works and you'll be able to add foods to your diary that way.1
Answers
-
I have been having the same problem, since 4/26/24.0
-
Same.0
-
Same.
The "add food to diary" buttons submits a POST to /food/add, which redirects to /accounts/login?callback=.../food/add, which loads a GET to /food/add with all the form data missing, which shows an outdated "page not food" error.
So probably a bad authentication check in the /food/add handler or something.0 -
Alright, last post to this thread I swear.
If you understand what a userscript is and you're comfortable using them, here's one that will take you to the database search page when you focus the search bar on an "add food" pages, keeping you away from the broken bits.
It's a tradeoff, as you'll need to adjust the day and meal yourself on every add, but it's what I'm using until this gets fixed.// ==UserScript== // @name MFP add food bug workaround // @namespace http://tampermonkey.net/ // @version 0.1 // @description route around damaged /food/add API // @author metal_hurlant // @match https://www.myfitnesspal.com/food/* // @match https://www.myfitnesspal.com/user/*/diary/add // @icon https://www.google.com/s2/favicons?sz=64&domain=myfitnesspal.com // @run-at document-start // ==/UserScript== addEventListener('load', _=>({ add_to_diary() { document.querySelector('#search').addEventListener('focus', _=> location.assign('/food/calorie-chart-nutrition-facts')) }, add() { this.add_to_diary() }, 'calorie-chart-nutrition-facts': _=> document.querySelector('[name="searchInput"]').focus() })[location.pathname.split('/').at(-1)]?.());
1 -
Just tried it this morning & it's working now! Thanks for all your replies!0
-
The problem went away for me for a single food item but otherwise I'm still having it. I can add food on the phone app so that's my workaround but I hate it.0
-
I'm having the very same issue, so I copied and pasted from a previous post: When I search for a certain food and hit the button that says Add Food to Diary, it takes me to a page that says: Page Not Found. I've cleared my cache, but it still is not working.0
-
This has been going on for a few weeks now. It only happens when using firefox but explorer works fine. I'm a firefox user so I'm hoping this gets fixed soon.0
-
I realize this is an old post but I just signed up yesterday and I'm having this same issue using Chrome browser on my desktop. Has anything changed since May regarding this issue? I will try it on MS Edge to see if it works there.0
Categories
- All Categories
- 1.4M Health, Wellness and Goals
- 393.4K Introduce Yourself
- 43.8K Getting Started
- 260.2K Health and Weight Loss
- 175.9K Food and Nutrition
- 47.4K Recipes
- 232.5K Fitness and Exercise
- 426 Sleep, Mindfulness and Overall Wellness
- 6.5K Goal: Maintaining Weight
- 8.5K Goal: Gaining Weight and Body Building
- 153K Motivation and Support
- 8K Challenges
- 1.3K Debate Club
- 96.3K Chit-Chat
- 2.5K Fun and Games
- 3.7K MyFitnessPal Information
- 24 News and Announcements
- 1.1K Feature Suggestions and Ideas
- 2.6K MyFitnessPal Tech Support Questions