Jump to content

Switching fields to Language fields produces fatal errors


arjen
 Share

Recommended Posts

Switching fields like PageTitle to PageTitleLanguage gives errors like:

Error: Exception: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'field_title.data1011' in 'field list' (in /Users/xxx/Sites/xxx/www/wire/core/DatabaseQuery.php line 86)

Both admin and frond-end gives this error.

Installed (core) modules:

Languages Support (1.0.1)
Languages Support - Fields (1.0.0)
Languages Support - Page Names (0.0.8)
Languages Support - Tabs (1.0.8)

ProcessWire: 2.3.9 (clean install with the latest dev branch - 0bb84e0d9fdd973376e5bbaaa1e1e4cf4fcc8c5c)

PHP version: 5.4.17

MySQL version: 5.6.14

When I try the same files on another MySQL version 5.1.54 the changing works fine.

Does anyone knows if this is MySQL related and how to fix this? Thanks!

Link to comment
Share on other sites

I did some more research. With PHP 5.5.3 and MySQL 5.5.33 (MAMP) the switching between PageTitle and PageTitleLanguage works fine with a clean install. But when importing the files from the other version it won't work resulting in the same errors.

Link to comment
Share on other sites

More research. Now on Windows with XAMPP (1.8.3) and PHP 5.5.6 and MySQL 5.6.14. Since the MySQL versions are the same on my local development machine I think I can rule out that it's a bug regarding that specific MySQL version. Will investigate further in the next days.

  • Like 1
Link to comment
Share on other sites

Thanks for investigating this. If you find that it is something repeatable please send over a GitHub bug report (or post here if you prefer). I did just try to reproduce it myself (in MAMP), but wasn't able to yet. 

Link to comment
Share on other sites

With the latest dev (8c42730c4f79c894bbf380870e3c06216bf860df) branch no errors on:

PHP version: 5.4.17

MySQL version: 5.1.73

 

When I install MySQL 5.6.14 I'm getting the errors again on the same install. I'm using the 5.1.x version of MySQL for now. If no-one is getting errors I'm giving up :)

Link to comment
Share on other sites

I thought of that too, but I ran disc utility and the problem still persits. If I install the latest MySQL it's broken. It I remove it and install the older MySQL version it's working. When I delete that one and install the latest version it's broken, and so on.

Link to comment
Share on other sites

I will upgrade to the latest MAMP here soon and see if I can reproduce it. You've got me wondering if there is some incompatibility with that version of MySQL (5.6.14). Though if it were widespread, you'd think we would have heard about it more than once.. and maybe we will. I'll keep an eye out and do some testing here too. 

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

redirect from topic:
http://processwire.com/talk/topic/5788-bug-fieldtypepagetitlelanguage/

I have tried to change the title fieldtype from Title to TitleLanguage in PW 2.4

got Error: Exception: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'field_title.data1019' in 'field list' (in /wire/core/DatabaseQuery.php line 86)

Hi, I am using PHP 5.4.24, 5.6.10 MySQL and Master PW 2.4. The Error happens if I want to switch any existing field to the Multilanguage Version AFTER I had installed the new language. It works if I do it the other way round. In the case of the title field, which is not deletable I added the specific language column like 'data1019' manually to the database table.

Link to comment
Share on other sites

  • 4 weeks later...
  • 2 months later...

Just wanted to add that I have the same problem on PW 2.4 release and 2.4.5 - it happens every time I change a field type to it's Language version. The only fix seems to be to manually create the dataxxxx field in the DB.

Link to comment
Share on other sites

  • 1 month later...

I've run into the same issue.

I found the following query to be the culprit:

SELECT false AS isLoaded, pages.templates_id AS templates_id, pages.*, pages_sortfields.sortfield, (SELECT COUNT(*) FROM pages AS children WHERE children.parent_id=pages.id) AS numChildren,field_title.data AS `title__data`,field_title.data1013 AS `title__data1013` 
FROM `pages` 
LEFT JOIN pages_sortfields ON pages_sortfields.pages_id=pages.id 
LEFT JOIN field_title ON field_title.pages_id=pages.id 
WHERE pages.templates_id=44 
AND pages.id IN(1009,1013) 
GROUP BY pages.id

Also note that the page id 1013 is the language page.

Edit: This is running on

ProcessWire 2.4

PHP 5.4.30

MySQL 5.6.19

Link to comment
Share on other sites

  • 2 months later...

Same problem here, but I get the following error after adding an additional language:

Error:  Exception: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'pages.name1017' in 'where clause' (in /var/www/vhosts/xxx/xxx/wire/core/DatabaseQuery.php line 91)

My server is running PHP 5.3.10 / MySQL 5.5.38. I installed PW 2.5.3 using the 'Multi Language' profile.

Additionally - I'm not sure if it's related to this issue - I can only see or edit the page name for the default language (as reported here with screenshots).

Link to comment
Share on other sites

@Didjee - Looks like Ryan may have taken care of most of this, but not quite all. It is an SQL settings issue - certain settings come by default in MySQL 5.6.x, but can also be present on other versions. Does adding that field (column) to the pages DB table take care of it? I'll let Ryan know, but it would be good if you could confirm that fixes things fully.

Link to comment
Share on other sites

I've tried to duplicate this one here, but haven't been able to. I've kept the MySQL settings for my dev server at the strictest settings possible for the last month or so, so am thinking that whatever the issue is here, it's probably something different than we've seen elsewhere. Also, so far this is the only report I'm aware of this occurring in the current release version of PW. Since the error is very similar to the one we saw before the MySQL settings issue was fixed, I do wonder if just grabbing a fresh copy of the PW core might be a good idea here. Didjee if you are able to try that, please let me know. You might want to try the dev branch, since that always has the latest updates on it. 

Link to comment
Share on other sites

@Ryan: I did a fresh install using the dev branche of PW. I tested this locally using MAMP with PHP 5.3.29 / MySQL 5.5.38.

I tested the following scenarios:

  1. Installed PW using the multi language profile without changing the admin name. Added a new language: no errors
  2. Installed PW using the multi language profile, changed the admin name from processwire to admin. Added a new language: no errors.
  3. Installed PW using the multi language profile, changed the admin name from processwire to sitemanager. Added a new language: getting the errors as posted earlier.

Conclusion: I think this errors have something to do with the fact that the admin name is starting with site (as you already suggested here https://github.com/ryancramerdesign/ProcessWire/issues/764). It also has an effect on LanguageSupportPageNames.

Link to comment
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
 Share

×
×
  • Create New...