Post by Sokonomi » Mon Mar 19, 2018 9:26 pm

My webshop keeps insisting on using English despite me setting the default to Dutch in 'System > Settings > my_shop > Local'. It does remember my setting after setting it to Dutch once on the front end, but for any new customers initially it seems to be set to English by default.

Does anyone know why this could be happening? Is it reading my computers native language setting? And if it does, any way turning that off?

Active Member

Posts

Joined
Sun Sep 30, 2012 4:52 am

Post by straightlight » Mon Mar 19, 2018 9:43 pm

No OC version posted.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Sokonomi » Mon Mar 19, 2018 9:51 pm

Figured it would be fairly obvious since its in OpenCart 3.0 Support, but to be specific, its 3.0.2.0
Please dont tell me its another known bug with this version.. :-\ Heard enough of those already..

Active Member

Posts

Joined
Sun Sep 30, 2012 4:52 am

Post by IP_CAM » Tue Mar 20, 2018 8:10 am

Heard enough of those already..
Well, beeing around here for a good while already, you should have known better! :D
All former OC Main Versions used different Subversions, and they all where different
in some places from the others. But it was you own decision, to play new Version Tester
again, so, better get used to mention Facts&Figures, to enable others, to even care about.
Good Luck! ;)
Ernie

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by Sokonomi » Tue Mar 20, 2018 3:15 pm

I avoided the beta, apparently that wasnt good enough.
So now what, to get a working webshop, back to 1.5?

Active Member

Posts

Joined
Sun Sep 30, 2012 4:52 am

Post by straightlight » Tue Mar 20, 2018 9:03 pm

Replace those two files on your store:

- https://github.com/opencart/opencart/bl ... nguage.php
- https://github.com/opencart/opencart/bl ... guage.twig

Then, clear all OC caches from your OC admin.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Sokonomi » Wed Mar 21, 2018 8:13 am

Aha, so it has been patched? ;D

Thanks for the help, I shall give it a go and see if it sticks.

Active Member

Posts

Joined
Sun Sep 30, 2012 4:52 am

Post by Sokonomi » Wed Mar 21, 2018 10:58 pm

It doesn't seem to fix it, unfortunately.
It does flip the flag to the second language at the top, but the site remains English.
Furthermore, switching languages is now impossible entirely; choosing dutch does nothing now.
Did I miss a part?

Active Member

Posts

Joined
Sun Sep 30, 2012 4:52 am

Post by straightlight » Wed Mar 21, 2018 11:19 pm

Did you cleared your OC cache from the OC admin afterwards? Are you also using SSL on your site?

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Sokonomi » Thu Mar 22, 2018 12:20 am

I cleared the cache yes, but no SSL since its a test server running locally.

Active Member

Posts

Joined
Sun Sep 30, 2012 4:52 am

Post by straightlight » Thu Mar 22, 2018 12:39 am

What was the way you cleared the cache?

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Sokonomi » Thu Mar 22, 2018 1:09 am

- Dashboard > Little cog at top right.
Cleared both theme and SASS caches.
- Extensions > Modifications > Refresh
Just in case.
- Deleted all except index in /storage/cache/
- Cleared cookies in my browser.
- Tried loading site in incognito mode as well.

All it did for me was make <nav> taller, lock the flag, and make it impossible to switch languages.

Ive also tried messing with language priority numbers in System > Languages.
Made sure dutch has the first priority over English being 99.
In store settings Dutch is set as primary language in both front and admin.
Only way to get it to go Dutch from initial visit is to straight up disable English.

Active Member

Posts

Joined
Sun Sep 30, 2012 4:52 am

Post by straightlight » Thu Mar 22, 2018 1:23 am

Is your storage folder located outside your public_html folder?

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Sokonomi » Thu Mar 22, 2018 3:13 am

Yes, its outside htdocs

Active Member

Posts

Joined
Sun Sep 30, 2012 4:52 am

Post by IP_CAM » Thu Mar 22, 2018 3:19 am

So now what, to get a working webshop, back to 1.5?
Well, not necessarily - only, if you prefer to have your working shop again. :D

But then, this place would not be so busy, if users could just install latest things, to
make them work, as planned. But for some unknown reason, I don't even feel sorry
with anyone, since no-one was ever driven, by 'official sources' at least, to upgrade
existing Versions to latest x.x.x.x for some performance- or security-related Reasons.

From this point of view, it's understandable, that so little 'official' Information exists
around OC, like when it comes to so-called Version Upgrades, especially the consequences
involved, compared to older Versions, Themes, and Extensions. They know, that Pro
Users would never try such foolish Things, like overwriting existing installations, or then
killing them, before a new Version is really tested and works in full.

But it is been done, obviously on a daily bases, by mostly Smartphone Click APP familiar
generation Users, I assume, fully unaware of, what they are doing.

But one can't stop people from trying, expecially, if something (basically) comes for free.
And one expects something, different and/or better, it's therefore human and logical, to
try it out. But killing an existing Moneymaker Software is like scrapping a running Car, and
then end up with no Car, since final production of the cheap TESLA has been delayed... :choke:

I am not trying to sound critical or sarcastic, I would just wish, that such matters would be
'handled' here in a more 'neutral' and distant way. It makes no sense, to tell the folks, how
great a NEW Version is, or how bad the former Versions where, by comparance, as long as
daily reports just prove the contrary. It's more like 'Doctors', telling you, how sick you are, to
so hopefully sell you a bag full of (legal) Drugs... :crazy:

We are all part of a Tester Crowd, it's our duty, to find misses and faults. That's why OC comes
for free, because it would not be a great Idea, to give away a great business software for free,
just to make Friends, or feel better.

Better be aware of this. ;)
Ernie

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by Sokonomi » Thu Mar 22, 2018 3:43 am

Hey Ernie,

Well, cant look a gifted horse in the mouth I suppose, but by going up the version numbers, people can only naturally assume things get better, not worse? :') I just assumed a new version meant things were improved. But that might just be my phone app mentality (whatever that is). Quite honestly, if a build has big glaring bugs like these (I ran into a handful of em so far), how/why did it ever make it out of beta? Ive made jumps from 1.5 to 2.0 to 2.3 to 3.0, This one has given me more grief than the last 3 versions ever did combined.

I'm just whining because its been a grueling week for me, getting this "new and improved" 3.0 guffins back to 2.3 functionality. I got most of it beaten into submission now, but this language bug keeps haunting me. Once I get a handle on that one, I'm gonna leave the code the hell alone for the next 5 years. :crazy:

Active Member

Posts

Joined
Sun Sep 30, 2012 4:52 am

Post by straightlight » Thu Mar 22, 2018 4:36 am

In catalog/controller/common/language.php file,

find:

Code: Select all

$this->load->language('common/language');
add below:

Code: Select all

if (!empty($this->session->data['user_token'])) {
    $this->log->write('Catalog Language :: DEBUG :: Test 123');
}
Then, clear all your OC cache from the admin again. From the admin header (top-right), click on your store. Select your language again. Then, go to your admin - > systems - > maintenance - > error logs page. Do you see a recent line beginning with: Catalog Language :: DEBUG :: Test123?

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Sokonomi » Thu Mar 22, 2018 4:49 am

Log indeed shows "2018-03-21 13:50:29 - Catalog Language :: DEBUG :: Test 123"
Twice in fact. One happens immediately upon loading the page, and another one once I select a language.

Active Member

Posts

Joined
Sun Sep 30, 2012 4:52 am

Post by straightlight » Thu Mar 22, 2018 5:13 am

Which is supposed to happen. So far, it is not a cache issue, at least. Are you sure to have replaced those two files from Github and that the content you see from the view source regarding the language selection matches the content you have in the replaced TWIG file?

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Sokonomi » Thu Mar 22, 2018 5:25 am

I have put the changes through as asked, though I have reverted again since it wasn't working.
I can inject the changes again and give you the link to my server to see for yourself if you'd like?

Active Member

Posts

Joined
Sun Sep 30, 2012 4:52 am
Who is online

Users browsing this forum: Baidu [Spider] and 35 guests