salzig

SQL error when trying to create a new language

5 posts in this topic

Hello everybody!

I am trying to create a new language on a fresh multilanguage install of processwire, and i keep getting this SQL error:

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'pages.name1020' in 'where clause'

I got this error on the current master release (which i think is 3.0.42 as of now), then i tried to use 3.0.35 to doublecheck, but i still keep getting this error. Steps to reproduce look for me like this:

  1. Install PW (using multilangauge profile)
  2. Create a new Language

The new language is still being created, but is greyed out when editing content. So, is this a bug, or am i overlooking something? Thanks in advance.

Edited by salzig
forgot to mention that i am using the standard multilanguage site profile

Share this post


Link to post
Share on other sites

I think I had this problem as well. I believe I solved it by changing the default PW 3 config.php file. There could be 2 lines in there in the database section that you can comment out or delete, one should be the db connection type. 

Share this post


Link to post
Share on other sites

Thank you for looking into this Marc! I checked the config.php file, but there are only the usual connection settings like db name, host and password. No connection type specification or anything of interest.

While trying to further track down the issue, i noticed that after fresh installation with multilanguage site profile, in the settings tab of the homepage i am only seeing the name field for the english language, where as according to documentation i should be seeng fields for all three languages (english, german and finnish). I am appending a screenshot of the settings tab of my homepage right after the fresh installation.

I am still completely lost - what happened to the other two languages?

Home-Settings-MultiLang.png

Share this post


Link to post
Share on other sites

I am still struggling with this one. Looks like i am the only one having this odd problem. Maybe any ideas, how to track this down?

Now, is this the correct table structure for table "pages" right after the installation with the builtin multilang site profile?

pages

Column Type Null Default Comments
id int(10) No     
parent_id int(11) No   
templates_id int(11) No   
name varchar(128) No     
status int(10) No   
modified timestamp No  CURRENT_TIMESTAMP   
modified_users_id int(10) No   
created timestamp No  2015-12-18 06:09:00   
created_users_id int(10) No   
published datetime Yes  NULL   
sort int(11) No   
name1012 varchar(128) Yes  NULL   
status1012 int(10) No   
name1013 varchar(128) Yes  NULL   
status1013 int(10) No   
name1020 varchar(128) Yes  NULL   
status1020 int(10) No   

Share this post


Link to post
Share on other sites

I can't reproduce it here, so something in your installation has to be different. Which versions of PHP and MySQL are you running? Did you choose any non-default options when installing PW (like InnoDB storage engine)?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Doc
      Hi guys,
      I've just had this wonderful idea : I know that multi-language field (example : $page->myfield) are useful whatever the page. I mean you can define a multi-language field in your homepage and make use of that same field in another page and benefit of the different translations there too.
      Is it the same for translatable string (such as echo __("blablabla")) ? Am I able to translate some strings in one template and benefit of those translated strings in another template ?
      Thanks
    • By Doc
      Hi guys,
      I'm using translatable strings such as :
      echo __("Hello"); It works on my dev configuration but when I upload the website on the production environment, it only displays the default language.
      Do I have to upload some special files where could be located the translations ?
      Thanks
    • By Harmen
      Hi all,
      Recently I launched a module -ImportPagesPrestashop-, and now I was thinking if it is worthy to translate this module in several languages (starting with a translation in dutch, because I'm from the Netherlands). Is it worth to put the effort into the translation or do you guys think ->English is the best and translations are not needed?
      Thanks in advance,
      ~Harmen
    • By Doc
      Hello (again),
      My project is a multilanguage one.
      On the homepage, I have a header menu where I display link of features, example :
      <?php      $lg = $session->lg;     echo $page->localHttpUrl("$lg").'dashboard'?> ?> My website displays french by default.
      The homepage is : www.website.com/ (in french default language)
      The link in the code above is rendered as : www.website.com/dashboard
      When I click on this link, it does a 301 -> www.website.com/fr/dashboard
      dashboard is a child page of the homepage.
      When I does the same in a non default language, such as 'en' / english for example, it doesn't do that 301 because the generated link in my code is www.website.com/en/dashboard
      I know there is an option in the core module LanguageSupportPageName to prefix the page of the default language by 'fr' (in my case), but apparently it's not recommended.
      "Choose Yes if you want the homepage of your default language to be served by the root URL / (recommended). Choose No if you want your root URL to perform a redirect to /name/ (where /name/ is the default language name of your homepage)."
      Maybe it's not recommended because it's causing a 301 when you arrive the first time on the homepage (from / to /fr).
      So how I could generate my link in the menu such as it displays www.website.com/fr ? I can do it by hacking some php of course, but perhaps there is a PW way to do it ?
      Thanks
    • By vanderbreye
      hey! i want to read a value from a $page which is a multilanguage-field. 
      it is important for me that i get that field NOT language-filtered, so the whole JSON string '{"0":"abdc","1063":"rguer"}'..
      is this somehow possible without switching the fileld to not-multilanguage? because i need the filtered output at other places...
      is there a possibility to read the RAW data? 
      thanks!