I am trying to build an admin panel with Laravel framework for a website that is going to be in Bengali language. I can write Bangla fonts in my mysql database quite fine and when I insert directly into the database the fonts are displayed fine but when I try to insert Bangla from the panel and try to see the output through my laravel controllers, the fonts are not displayed. Can anyone give me a solution?enter image description here
This is where I am trying to add a category name in Bangla. You can see the font working well here. I am using Avro Keyboard for inserting Bangla. But when I try to display it, it is displayed like this
enter image description here
You can see that Bangla fonts are not working properly. Now this happens only when I am using laravel. I have inserted Bangla directly into mysql database in xampp but then it works fine.
$category->category_name = ucwords(strtolower($request->category_name));
This is the code I'm using in my controller to insert the category name.
I am using php 7 and database collation is utf8_general_ci. I am also using this meta tag <meta charset="utf-8"> in my site's head section. Now could anyone please provide me a solution? It would be greatly appreciated. Thanks.
I have found the problem. In my controller I was using strtolower() and ucwords() when inserting the category name. That's what was causing the problem.
Related
Hello everyone,
i use laravel voyager as back-end.. My Admin doesn't work correctly..
font awesome, images, etc don't appear in the Admin.
https://i.imgur.com/bqFFu6J.png
when i try to Add a product a get this error:
https://i.imgur.com/LAxuhlb.png
Can anyone suggest me that what can I do to solve the problem.
Please check follow:
First.
Please clear browser cache.
php artisan optimize
If it doesn't work let me know how to import font files.
Second.
Please set primary key and auto increment on "id" field of "categories" table.
I am working on magento 1.9 version.I want to add a custom image field in drop down of custom options.
I added a text field using following guide
http://magento.ikantam.com/qa/how-add-custom-attributes-custom-options
which is working fine.but when I add a file field then it shows in admin but not save image field value in database.
please help me to solve this.
Neeraj,
Did you specifically click "flush cache storage" By following this guide and adding new tables directly to the database, Magento already has this record in cache. By flushing cache storage, you will allow magento to recognize the new structure and be able to save the record. I have accidentally forgotten to do this quite a few times and you end up with the inability to save a record even though your structure is there.
I have a strange issue when i am logged in and exploring the pages created from CP all goes well. But when i am logged out and go to the same page it says Page missing. What is the problem? Also this is only happening only on those pages where i am not using any tags to display data from database tables. It is happening on about use page etc
I have found the problem. Using Access options i change from default to live and now it is working fine.
I am just stuck with a issue regarding session. I have a multilingual ecommerce site for english and arabic language. In case of arabic language when someone registers with a arabic name, description or such fields s/he can register successfully. But during login the session data being lost.
Actually when setting all the data into a session array its being stored and i tested it by printing the array. But after the valid authentication when user being redirected to index page or profile page then the session array disappears. The full array being lost. and login doesnt working. Its only happening for someone who has arabic fields on their data. for english its perfectly ok.
I have removed the session.php from syatem/libraries directory. Then it works only on localhost, on server it creates problem when ordering or viewing items of a particular org.
Any suggestion will be accepted cordially.
Thanks
Thank u so much all of u for your reply.... and my issue has been solved.
Unfortunately my session table user_data field collation was not utf8_unicode. Thats why the data was being lost when it redirects to home page. Since it is using the ci_session table. Its working now nicely.
Before posting the question i have tried using native session, updated the Session.php file on system/libraries....But haven't got the perfect solution.
But finally could have figured out the silly mistake and done with the issue.
Cheers to all....:D
Thanks
Please try to use Native Session instead of default CI_Session and see if your problem will be solved?
Here is a link for you:
https://github.com/appleboy/CodeIgniter-Native-Session
I've installed the sample data from the magento site. Then also
installed magento with each mysql table configured to be named
with the magento_ prefix so as to tell the magento system tables
apart from the data tables. But I have the following problem (yes,
I installed the data first, and then magento, so that's not the issue):
The main content area when I http to localhost/magento/index.php
is blank. I don't see any data. I was expecting to see the
Magento sample store with sample category pages etc...
What have I done wrong?
Been having the same problem, it seems that you cannot use a table prefix in your installation if you want the sample data to show up.