Open architchandra opened 3 years ago
Also encountered errors of the type mentioned in #13 and #14, where a block just wasn't getting cloned at all and the action was failing silently.
From the smith.log
file:
2021-01-18 20:16:31 [-][1][-][error][smith] Unable to find block for new1.
2021-01-18 20:16:31 [-][1][-][error][smith] {"type":"timeline","enabled":"1","fields":{"heading":"Early Admission","events":[{"col1":{"date":"05/12/2019","timezone":"Asia/Kolkata"},"col4":{"date":"21/01/2021","timezone":"Asia/Kolkata"},"col2":"dmy","col3":"Last Date of Application"},{"col1":{"date":"04/01/2020","timezone":"Asia/Kolkata"},"col4":{"date":"23/01/2021","timezone":"Asia/Kolkata"},"col2":"my","col3":"Personal Interview"},{"col1":{"date":"01/02/2020","timezone":"Asia/Kolkata"},"col4":{"date":"","timezone":"Asia/Kolkata"},"col2":"my","col3":"Announcement of Selection"}]},"blockId":"new1"}
and
2021-01-18 20:06:05 [-][1][-][error][smith] Unable to find block for new2.
2021-01-18 20:06:05 [-][1][-][error][smith] {"type":"table","enabled":"1","fields":{"table":{"columns":{"colcol0":{"heading":"Item","width":"50%","align":"left"},"colcol1":{"heading":"Amount","width":"20%","align":"left"},"colcol2":{"heading":"Deadline","width":"30%","align":"left"}},"rows":{"rowrow0":{"colcol0":"First semester","colcol1":"30000","colcol2":"30 Nov 2020"},"rowrow1":{"colcol0":"Second semester","colcol1":"35000","colcol2":"3 Jan 2020"}}}},"blockId":"new2"}
Both kinds of issues seem a bit random, though, and are reproducible only after multiple trial-and-error attempts.
Should be fixed in 1.1.12, but let me know!
Thanks a lot for the quick turnaround, but it looks like the problem of blocks not turning up when cloned still exists...sort of.
I cloned a block containing a table and new block didn't show up. But I tried again and it did the second time. Still feels a bit random and not reliable. I Will test more and share my findings.
Also, when a block fails to clone, the browser scrolls to either the top or bottom of the page. (Probably because the element to scroll to doesn't exist?)
Hmmm, I'll also try my best to replicate it again!
Is there a chance that my data has become corrupt? Any changes that I should make (like re-save entries)? I'll also try on a new entry.
Hi @engram-design
I had updated the plugin to 1.1.14
but am still seeing the issue where the wrong block is sometimes cloned (usually the block that I had cloned earlier).
I'm also seeing another issue in one of the entries where the Clone button stops working altogether (nothing happens when I click it, even the dropdown with the Copy, Paste and Clone options stays open as if the associated click (or equivalent) event didn't fire).
In the above case, I also noticed an error in the console:
Uncaught TypeError: t.blocks.filter is not a function
at s.constructor.filterBlocks (smith.js:291)
at smith.js:317
at Array.forEach (<anonymous>)
at s.constructor.filterBlocks (smith.js:307)
at smith.js:317
at Array.forEach (<anonymous>)
at s.constructor.filterBlocks (smith.js:307)
at smith.js:317
at Array.forEach (<anonymous>)
at s.constructor.filterBlocks (smith.js:307)
It would be great if you can help with this. Thanks!
Version information:
Craft CMS: 3.7.7
Smith: 1.1.14
Browser: MS Edge for Mac Version 92.0.902.73 (Official build) (arm64)
OS: MacOS Big Sur 11.3.1 (20E241)
(Attaching images to share more information on the system and plugins).
Really struggling to replicate this one, particularly the error being thrown. Wondering if you might be able to share a video of you replicating the issue? If there are any nested fields (or if the Matrix is nested), as well as trying a reduced test case (test an entry with little to no blocks).
Description In a Matrix field, the wrong block (and of the wrong type) gets cloned while the entry is in an unsaved state. It was likely the block on which the clone functionality was run previously. Starts working properly on saving the entry but happens again after a few blocks are clones without saving the entry. I was able to see this most commonly on blocks that contained Table fields, but that might be a conincidence.
Steps to reproduce
Additional info
1.1.11
3.4.30
Additional context A few Super Table fields exist in the system but not in the Matrix field in which I observed the issue.