Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3721292
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T05:30:22+00:00 2026-05-19T05:30:22+00:00

I want tho have I18N categories table. I have followed the jobeet example .

  • 0

I want tho have I18N categories table. I have followed the jobeet example.

Schema and fixtures data below.

./symfony doctrine:build --db --all-classes --and-migrate
./symfony doctrine:data-load data/fixtures/category.yml

When I run these commands no data gets inserted into database and red box with failure displays: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘1-et’ for key ‘PRIMARY’

Queries that get executed on data-load task (logged with “mysqld –log=logfile”):

1 Query DELETE FROM my_category
2 Query START TRANSACTION
3 Query SELECT k.id AS k__id, k.position AS k__position FROM my_category k ORDER BY k.position desc LIMIT 1
4 Query INSERT INTO my_category (gender, position, created_at, updated_at) VALUES ('female', '1', '2011-01-14 12:33:05', '2011-01-14 12:33:05')
5 Query SELECT k.id AS k__id, k.lang AS k__lang, k.slug AS k__slug FROM my_category_translation k WHERE (k.slug LIKE 'name-value%' AND k.lang = 'et' AND k.name = 'Name value')
6 Query INSERT INTO my_category_translation (id, lang, name, seeking_label, seeking, slug) VALUES ('1', 'et', 'Name value', 'Label value', 'Value', 'name-value')
7 Query SELECT k.id AS k__id, k.lang AS k__lang, k.slug AS k__slug FROM my_category_translation k WHERE (k.slug LIKE '%' AND k.lang = 'et_EE' AND k.name IS NULL)
8 Query INSERT INTO my_category_translation (id, lang, slug) VALUES ('1', 'et_EE', '')
9 Query rollback
10 Quit 

When I manually run these commands on freshly built database. Queries from 3 to 6 above run fine and insert data.
Query nr. 7 does not output data and query nr. 8 is the failing one. (Because id 1 already exists, inserted in step 6).

The problem must be in query nr. 7. “k.lang = ‘et_EE'” I’m pretty sure it should be ‘et’?
Why query nr. 7 is neccessary seems exactly like query nr. 5 but without and/or messed up values?

What I have gotten worng or is it a bug?

schema.yml

myCategory:
  actAs:
    Timestampable: ~
    Sortable:      ~
    I18n:
      fields:       [name, seeking_label, seeking]
      actAs:
        Sluggable:
          fields:   [name]
          uniqueBy: [lang, name]
          builder:  [mySluggableTranslit, urlize]
  columns:
    name:          { type: string(255), notnull: true }
    gender:        { type: string(6)   }
    seeking_label: { type: string(255) }
    seeking:       { type: string(255) }

data/fixtures/category.yml

myCategory:
  category-1:
    gender: female
    position: '1'
    Translation:
      et:
        name: 'Name value'
        seeking_label: 'Label value'
        seeking: 'Value'
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T05:30:23+00:00Added an answer on May 19, 2026 at 5:30 am

    Got solution: Sortable behavior is not mixing well with I18n.

    If you want to save yourself from 3 days of debugging then don’t mix
    Sortable “csDoctrineActAsSortablePlugin” behavior with I18n behavior.

    I’ll just drop sortable support for now. Any reccomendations for Sortable bahavior that works with I18n is welcome.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Want to run javascript function from parent window in child window Example I have
want to have a Hyperlink-Button in a gridView in which I can display a
Want the function to sort the table by HP but if duplicate HPs then
Let's say I have the following within my source code, and I want to
want declarative transactional management example in spring aop........ Actually Here <aop:config> <aop:advisor advice-ref=addAdvice pointcut=execution(*
I have two tables, one with categories and subcategories. Each category and subcategory has
I have foreign object instance and i want to examine properties of the component
I want to disable viewstate for nearly all of my pages and I have
Suppose I have the classes/models Projects (has many lists) Lists I want to allow
I have the following URL: http://domain.com/index.php?m=feedback&cSubject=My Subject I want to have a rewrite rule

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.