OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

Forums Forums OroPlatform datagrid issues in widgets

This topic contains 8 replies, has 3 voices, and was last updated by  Geoffroy Cochard 8 years, 8 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #36901

    bosumflici
    Participant

    Hi,

    After update to 1.7.4 i have problems with datagrid only on dashboard widgets:
    1. If i click on a row (rowAction) it forwards the request to the view action but i get an error saying that configuration is missing for datagrid-myname[_w45] (_w45 is added to the datagrid name and indeed datagrid-myname_w45 does not exists, only datagrid-myname)

    2. Sorting and pagination is not working for all datagrids in widgets. A common thing where is not working is where is use type: twig and template: string..
    If i force a refresh (CTRL+F5) it is working.

    Any idea what did it happen in the new version? In old version (1.6.*) it was fully functional.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Author
    Replies
  • #36902

    Hryhorii Hrebiniuk
    Participant

    Hi

    From which version did you upgrade your instance? Or it was brand new setup?
    Do you have any customization installed?

    Sorting and pagination is not working for all datagrids in widgets

    Do you have any error messages in browser console?

    #36903

    bosumflici
    Participant

    Hi

    I upgraded from 1.6.3 to 1.7.4
    There are no errors in browser console or log files.

    #36904

    Hryhorii Hrebiniuk
    Participant

    Hi

    It looks that something went wrong during upgrade. Could you provide exact steps (executed commands), that you did on upgrade?

    #36905

    bosumflici
    Participant

    Nothing went wrong during update. I think is something changed in javascript, almost at every action/link appends an “-id_number”. Now i noticed it at anchors. If i have an anchor “#scroll-4” now when i click on link/button it goes to “#scroll-4-832”. I do not know from where comes “-832”

    #36906

    Hryhorii Hrebiniuk
    Participant

    If i have an anchor “#scroll-4″ now when i click on link/button it goes to “#scroll-4-832″. I do not know from where comes “-832″

    Yes, this is done intentionally to make scroll target unique and only for scroll navigation on view/update pages. Do you have any issue with that?

    It is not related to issue with dashboard widgets you have described above.

    1. If i click on a row (rowAction) it forwards the request to the view action but i get an error saying that configuration is missing for datagrid-myname[_w45] (_w45 is added to the datagrid name and indeed datagrid-myname_w45 does not exists, only datagrid-myname)

    What exact grid name you have issue with on dashboard?

    2. Sorting and pagination is not working for all datagrids in widgets.

    This is expected behavior, some dashboards grids are configured to have only default, one way sorter (such as “Recently accessed accounts”, “Recently accessed contacts”). They also might have turned off grid toolbar. And all these are done intentionally.

    Which is a grid that you’d expected to have sorting or pagination? And they have it in configuration, but in fact it does not work.

    #36907

    bosumflici
    Participant

    Yes, this is done intentionally to make scroll target unique and only for scroll navigation on view/update pages. Do you have any issue with that?

    Yes, i have an issue: in a view i have to scroll the view to a specific anchor. Now i am not able to do that because i do not know how to get that unique ID to append to old anchor!

    About dashboard grids (there are user custom dahsboard grids):
    – as i wrote in the first post: when i click on a row, it redirects to the right view page, but same as with anchors it append an UNIQUE ID to grid name, and i get exception in view because there is no grid defined with that name: grid-name-UNIQUE-ID

    – about sorting and pagination the problems seems to occur only when i have html front-end columns in grids

    #36908

    Hryhorii Hrebiniuk
    Participant

    in a view i have to scroll the view to a specific anchor. Now i am not able to do that because i do not know how to get that unique ID to append to old anchor!

    All standard links and ids of target elements are update at once for a scrollspy. So there are no links that don’t lead to their original targets. If you have custom links, you can overload module ‘oroui/js/scrollspy’, extend it and override makeUnique method to take in account your custom links. scrollspy.js

    If want to contribute your solution, you are welcomed to make pull request.

    – as i wrote in the first post: when i click on a row, it redirects to the right view page, but same as with anchors it append an UNIQUE ID to grid name, and i get exception in view because there is no grid defined with that name: grid-name-UNIQUE-ID

    Yes, it looks like dashboard grids name strategy breaks navigation Oro/Bundle/DashboardBundle/Datagrid/NameStrategy.

    For now there’s no standard dashboard grid that have defined row-click action, all navigation works over links in grid’s cells. You can use this approach, as work around, for custom dashboard grids, until it will be fixed.

    #36909

    Geoffroy Cochard
    Participant

    Hi,

    I’ve got same error when call link action in datagrid embed in dashboard widget in 1.7.5 version.
    NameStrategyRequestParser not check “_” separator in grid[***].

    TMP Hack in \Oro\Bundle\DataGridBundle\Datagrid\NameStrategy::parseGridName

    I’m a newbie on OROPlatform so i think it’s not THE solution…

    Geoffroy

Viewing 8 replies - 1 through 8 (of 8 total)

The forum ‘OroPlatform’ is closed to new topics and replies.

Back to top