BMCouto
BMCouto

Hi,

I keep getting error messages like this: AJAX handler 'onSwitchLocale' was not found.

When using components with custom markup, why? Same happens for Octomail component and others. What am I missing?

contact4179
contact4179

Hi, I have the same problem. I think regard the translate plugin (https://octobercms.com/plugin/rainlab-translate).

Last updated

Blackpig Creative
Blackpig Creative

Are you adding the custom markup to a layout or page/partial?

I found that you can't use custom markup on a page/partial only at the layout level. I did the following hack/work around to fix it. On your layout(s) add the component but hide it with css.

<div style="display:none">{% component 'localePicker' %}</div>

Then you can add your custom markup to the page or partial. It's a bit of hack but it works.

Mohsin
Mohsin

There is no need to add the html code. Just make sure add the component to the layout which is being used. Without adding the component to layout if you call the plugin's function it will report that the handler is not found.

Last updated

mkhalil.alex16655
mkhalil.alex16655

Hey guys, I had the same problem but after put it in the layout it works thks @Mohsin but what if i wanna put it in partial.

Vojta Svoboda
Vojta Svoboda

You can put it to the layout and also to the partial.

Mohsin
Mohsin

You can put it in partial too but as long as it also exists in the layouts. You see partial has lifecycle limitations so whatever component you want you can add to the partial but make sure you also add it to the layouts (No need to add the HTML code, just click on the component so that it appears in the layout as having been added).

dervisholliburim18837
dervisholliburim18837

Thank you guys it worked fine

mina.farag35160
mina.farag35160

just adding the component from the cms to the page i use make it work thanks @mohsin

Mohsin
Mohsin

roseysmith39276 said:

These plugins are not working on my device. I am facing lots of issue like Asus Error Code 55. If you have any useful solution please help me.

Asus Error Code 55 has nothing to do with OctoberCMS. Wrong forum..!

Last updated

1-10 of 10