Revolution: Trash cart not available, console errors

Created on 5 Feb 2019  路  6Comments  路  Source: modxcms/revolution

Bug report

Summary

The bug when deleting resources and the inability to go to the trash basket

Step to reproduce & Observed behavior

  1. Delete the resource, visually it will be displayed only after the page has been updated.
  2. Click on the trash icon and get an error in the console

trash_error

Expected behavior

  1. When you delete a resource, it should immediately become red and crossed out.
  2. Trash basket must be accessible

Environment

MODX 3.x current dev git branch
PHP 7.1

It seems that this issue intersects with https://github.com/modxcms/revolution/issues/13969

type-frontend bug

Most helpful comment

@Mark-H
May be that can help. I test on live site and it works.

\manager\assets\modext\core\modx.layout.js, line 313

change
tree[tab.handler.replace(/this./, '')]();
to
tree.redirect("?a=resource/trash");

and

\manager\assets\modextwidgets\resource\modx.tree.resource.js, line 238 & 283

change
trashButton.setTooltip(_('trash.manage_recycle_bin_tooltip', {count: data.object.deletedCount}));
to
trashButton.tooltip = new Ext.ToolTip({ target: trashButton.tabEl, title: _('trash.manage_recycle_bin_tooltip', {count: data.object.deletedCount}) });

All 6 comments

I confirm this bug.

It would be very useful to also post the error that gets logged into the console.

It would be very useful to also post the error that gets logged into the console.

As you wish, master. :-)

```js
Uncaught TypeError: tree[tab.handler.replace(...)] is not a function | in modx.jsgrps-min.js:1
at MODx.Layout.Default.fn (modx.jsgrps-min.js:1)
at h.Event.fire (ext-all.js:21)
at MODx.Tabs.fireEvent (ext-all.js:21)
at MODx.Tabs.setActiveTab (ext-all.js:21)
at MODx.Tabs.onStripMouseDown (ext-all.js:21)
at HTMLUListElement.I (ext-all.js:21)

Thanks :)

@Mark-H
May be that can help. I test on live site and it works.

\manager\assets\modext\core\modx.layout.js, line 313

change
tree[tab.handler.replace(/this./, '')]();
to
tree.redirect("?a=resource/trash");

and

\manager\assets\modextwidgets\resource\modx.tree.resource.js, line 238 & 283

change
trashButton.setTooltip(_('trash.manage_recycle_bin_tooltip', {count: data.object.deletedCount}));
to
trashButton.tooltip = new Ext.ToolTip({ target: trashButton.tabEl, title: _('trash.manage_recycle_bin_tooltip', {count: data.object.deletedCount}) });

The PR to resolve this this issue has been merged.

Was this page helpful?
0 / 5 - 0 ratings