[Resolved] Search bar is not only disappearing but also showing odd icons
This thread is resolved. Here is a description of the problem and solution.
Problem: The client reported two issues on their production site: URLs for French and Spanish product sub-menus were in English, and the French translation of some product or product category pages caused the search bar to disappear and display odd icons. Solution: We suggested the client to record a screen capture using Loom to better illustrate the issue. It was identified that the code blocks for the French header were broken, which likely caused the display issues. We recommended replicating the issue on a sandbox site for further debugging without affecting the production site. The client was also advised to create a separate staging environment with minimal plugins to isolate the problem. After navigating to specific admin pages and completing the translation, the header issue was resolved.
Please note that this solution might be outdated or not applicable to your specific case. We highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the issue persists, please open a new support ticket at WPML support forum.
This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
Hi Kor,
There are two issues pertaining where am unable to detect at the moment why it is so:
- French and Spanish Product sub-menus are having english URL
- On French translation of some product or product category pages Search bar is not only disappearing but also showing odd icons.
As this is on production site and would stand as bad impression to our visitors, please find some solution to it, its being cause by inappropriate string translation or so ? I do not understand!
Explanation of video :
- On translating any of the sub-menu options (product/product catg. both) to French, the search bar from above is disappearing leaving few odd symbols.
- As you can see in the video, this behavior of search bar is found only with FR and not ES translations, they are working fine.
What I suspect - I have put the Search bar string for translation and it seems to stuck in processing so far. [In SS] Can you please take a look and resolve asap.
Searchbox is coded in the functions.php
below is the code, But your point here does not make great sense that it is broke,
cuz the search bar is working completely fine for Spanish language
Also, search bar was appearing perfectly fine for French also, but I have noticed this distorted behavior of search box only after I have created the menu for French language for mobile and desktop, It was after the time - (When I was asking you how to create FR and ES menu for Product menu option which is built in avada.)
// Display the search box with category dropdown
function searchbox_cate_dropdown($atts) {
// Set default attributes
$atts = shortcode_atts(array(
'mobile' => false,
), $atts);
ob_start();
// Get selected category ID from query parameters
$selected_id = isset($_GET['cat']) ? intval($_GET['cat']) : 0;
Looks like this requires further debugging and could you please replicate the issue on our sandbox site here hidden link ? You can install the theme and plugins that are required to replicate the issue. Please do not import the entire site into this sandbox site.
Once you've replicated there, I will escalate this further for debugging.
Oh mhan, this is a blank sandbox, In order to replicate the issue, It will again take ages for me to setup everything, this is not a good way at all, by this way we are getting away from resolving it asap.
Please don't ask such things,,... this just seems like stretching the resolution session day-by-day and seems irritating.
Let me see, If I can create a separate staging env for you. A complete replica of the issue.
Meanwhile, please try to look into the issue on production only. Just try avoiding any critical changes.
I’m sorry to hear about your frustration and completely understand the time-consuming nature of replicating the issue. As these features are custom-coded, resolving the problem will likely require additional debugging and custom programming, which falls outside the scope of our support. However, I’d still like to explore if there’s anything we can do without involving complex customizations.
If possible, could you create a separate staging environment with only minimal plugins installed? I would like to avoid troubleshooting this directly on your production site. Also, it is not possible to create a duplicator package on your Website due to server restrictions.
I already have got one staging environment do you wanna use that ?
You can do whatever you want on that ? Have shared the credentials
Just that environment is not yet completely translated.
With free credits you can just translate the menus, I will create the structure and layout of menu. Basically as I mentioned earlier Search bar was appearing completely fine before I did created a french menu.
The spanish version has no such issues. Its working fine, SO I am sure there is NO CODE ERROR causing this.
The staging site is not the exact clone of the production site. Also, I can see the custom search is working here hidden link . Are you able to clone the entire production site so that I can recheck?
Until yesterday, Dev env was not ready, now I have got an exact replica of the production site ready for you, can you please share the private window so that I can share the credentials. Thanks