Cartodb: Table dependencies map cards broken on Editor

Created on 12 Jan 2018  路  13Comments  路  Source: CartoDB/cartodb

Steps to Reproduce

  1. Be on editor
  2. Create a map from a private dataset
  3. Go to dashboard and attempt to delete the dataset

Current Result

The map card for the created map is broken

screen shot 2018-01-12 at 18 07 15

Expected result

The map card for the created map shows up

Backend bug engine

Most helpful comment

Yeah, that's the fix I went for at first, but I went further and refactor it, extracting all that code to a presenter. I don't want to keep maintaining those serialize methods :) Thanks!

All 13 comments

(Assigned @javitonino as per Jorge Sanz suggestion)

cc/ @ramiroaznar

Hey @gfiorav when you said _the map card is broken_ you mean the thumbnail is not showing anything right?

It looks like it is happening on all cards from the maps dashboard:

image

Error in the console: Failed to load resource: the server responded with a status of 404 (Not Found)

{
  errors: [
    "Template 'tpl_5e6153ae_e028_47db_9429_b5edd5f113dd' of user 'solutions-editor' not found"
  ],
  errors_with_context: [
    {
      type: "unknown",
      message: "Template 'tpl_5e6153ae_e028_47db_9429_b5edd5f113dd' of user 'solutions-editor' not 
      found"
    }
  ]
}

Please take this one first. @enekid

Oki, so this is a tricky one. Basically, the auth tokens are not being sent in that request, so it fails. Fixing it is a bit convoluted:

  • Add auth_tokens to the table presenter (backend) and check security implications.
  • Read auth_tokens in frontend and somehow pass them to the URL generator (not trivial, as the parameters are written to DOM instead of using normal function calls).

As a note, I think this bug has been part of carto since the new dashboard (5 years or so).

Just to leave the note here, we recently fixed a similar issue (mapcards for org private maps in dashboard).

Links:

https://github.com/CartoDB/cartodb/pull/13119
https://github.com/CartoDB/cartodb.js/pull/1928

Bloomberg guys found a workaround, in case it's helpful: https://github.com/cartodb-org/cartodb/pull/272/files

^^ @javitonino @elenatorro

Yeah, that's the fix I went for at first, but I went further and refactor it, extracting all that code to a presenter. I don't want to keep maintaining those serialize methods :) Thanks!

We have already been talking about this. These changes must also be applied to the static pages we developed for the FE/BE split.

I have just checked it and @javitonino's changes are already applied to the frontend files and they work also in the static dashboard, so, it is done 馃帀

delete_dataset

We only need to fix the tests.

@elenatorro let me know where can I give you the acceptance! :-)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

arianaescobar picture arianaescobar  路  4Comments

atlefren picture atlefren  路  3Comments

makella picture makella  路  3Comments

nygeog picture nygeog  路  5Comments

fernando-carto picture fernando-carto  路  5Comments