Giter VIP home page Giter VIP logo

Comments (10)

nitriques avatar nitriques commented on August 29, 2024

Starting with 2.5, we should not do a lookup in the $entryData and should delegate to the new API prepareTextValue.

That being said, I really wonder why there are no field_id. Can you give me the output of

var_dump($field->get());

For all field in your section please ?

from link_preview.

twiro avatar twiro commented on August 29, 2024

Here you go...

Array
(
    [show_column] => yes
    [allow_override] => no
    [fetch_associated_counts] => no
    [hide] => yes
    [id] => 14
    [label] => Titel
    [element_name] => titel
    [type] => reflection
    [parent_section] => 5
    [required] => no
    [sortorder] => 0
    [location] => main
    [field_id] => 14
    [xsltfile] => 
    [expression] => {substring(entry/zeitraum/date/start, 1, 4)} KW {entry/wochen-nr}
    [formatter] => none
    [override] => 
)

Array
(
    [show_column] => yes
    [allow_override] => no
    [fetch_associated_counts] => no
    [hide] => yes
    [id] => 16
    [label] => Jahr
    [element_name] => jahr
    [type] => reflection
    [parent_section] => 5
    [required] => no
    [sortorder] => 1
    [location] => sidebar
    [field_id] => 16
    [xsltfile] => 
    [expression] => {substring(entry/zeitraum/date/start, 1, 4)}
    [formatter] => none
    [override] => 
)

Array
(
    [required] => yes
    [show_column] => yes
    [id] => 15
    [label] => Wochen-Nr.
    [element_name] => wochen-nr
    [type] => number
    [parent_section] => 5
    [sortorder] => 2
    [location] => main
)

Array
(
    [pre_populate] => now
    [required] => yes
    [location] => sidebar
    [show_column] => yes
    [id] => 13
    [label] => Zeitraum
    [element_name] => zeitraum
    [type] => datetime
    [parent_section] => 5
    [sortorder] => 3
    [field_id] => 13
    [prepopulate] => 0
    [time] => 0
    [multiple] => 0
    [range] => 1
)

Array
(
    [required] => no
    [show_column] => yes
    [id] => 12
    [label] => Nr.
    [element_name] => nr
    [type] => incremental_number
    [parent_section] => 5
    [sortorder] => 4
    [location] => main
    [field_id] => 12
    [start_number] => 1
)

Array
(
    [required] => no
    [show_column] => yes
    [id] => 50
    [label] => Frontend
    [element_name] => frontend
    [type] => link_preview
    [parent_section] => 5
    [sortorder] => 5
    [location] => sidebar
    [field_id] => 50
    [format] => /{$jahr}/{$wochen-nr}/
    [anchor_label] => Frontend
    [display_url] => yes
)

from link_preview.

twiro avatar twiro commented on August 29, 2024

Starting with 2.5, we should not do a lookup in the $entryData and should delegate to the new API prepareTextValue.

I'm currently using this field with 2.5RC1 - might this be the problem?

from link_preview.

nitriques avatar nitriques commented on August 29, 2024

I'm currently using this field with 2.5RC1 - might this be the problem?

I do not think so. I went ahead in a 2.4 DB and everything looks ok

image

The field_id column is there but is not retrieve somehow, so I would say that it's a number_field bug (or missing an un-documented spec).

from link_preview.

nitriques avatar nitriques commented on August 29, 2024

Could you also

var_dump($fields);die;

at line 216 so we can see all the entry's data please ?

from link_preview.

nitriques avatar nitriques commented on August 29, 2024

Just though about this: the fields array has the field id as the array keys: https://github.com/symphonycms/symphony-2/blob/master/symphony/lib/toolkit/class.fieldmanager.php#L255

How does 68025a4 looks like to you ? I really when deep in order to find what made me used $field->get('field_id') and I really can't figure it out.

from link_preview.

nitriques avatar nitriques commented on August 29, 2024

I really went*

from link_preview.

twiro avatar twiro commented on August 29, 2024

How does 68025a4 looks like to you ?

Looks great and works like a charm with number-field :)
Guess this will resolve the "no ID found"-bug for any possible field, so definitively the perfect solution for this issue - Thanks a lot!

from link_preview.

nitriques avatar nitriques commented on August 29, 2024

Great! I'll continue the work based on your commits and hopefully merge everything ASAP.

from link_preview.

nitriques avatar nitriques commented on August 29, 2024

Fixed in b0f94f5

from link_preview.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.