Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong resource insert on custom engine #1826

Closed
kalabiyau opened this issue Jul 17, 2012 · 8 comments
Closed

Wrong resource insert on custom engine #1826

kalabiyau opened this issue Jul 17, 2012 · 8 comments

Comments

@kalabiyau
Copy link

Steps:

  • fresh 2.0.5 rcms install
  • engine with resource generated, say document
  • on new document page trying to insert new file/resource
  • press create on dialog box
    dialog box closed, but no_resource_selected_file_id did not .hide()

With existing resource the story is different,
document[file_id] changed in DOM, but filename with icon(which is expected) did not appear.

My idea is that some js error persisted, because on

testObj = {href: "/system/resources/BAhbBlsHOgZmSSJEMjAxMi8wNy8xNy8xN18zNF81M18zODNfU2NyZWVuc2hvdF9mcm9tXzIwMTJfMDZfMTRfMTRfNTBfNDcucG5nBjoGRVQ/Screenshot%20from%202012-06-14%2014png:47.:format",
html: "Screenshot From 2012 06 14 14:50:47 (Screenshot from 2012-06-14 14:50:47.png)",
id: "30"}
resource_changed_file_id(testObj) 

happened exactly the same thing.

And with Save button on dialog XHR loaded is

XHR finished loading: "http://localhost:3000/refinery/documents/new?_=1342534789985".

I can reproduce it on both HEAD & 2.0.5 with both FF & Chrome

@parndt
Copy link
Member

parndt commented Jul 18, 2012

Can you please give the command you used to generate the extension?

@kalabiyau
Copy link
Author

@parndt Philip, hi

that was a command:

rails generate refinery:engine document title:string file:resource

@kalabiyau
Copy link
Author

@parndt Any advise on it ?

@ugisozols
Copy link
Member

I can reproduce this bug.

@parndt
Copy link
Member

parndt commented Aug 29, 2012

OK so this is when you upload a new resource and select that to be inserted it does not work but with an existing resource it works fine?

@ugisozols
Copy link
Member

@parndt yes.

It's happening to image picker too (wondering if it's related to recent ajax upload merge).

@parndt
Copy link
Member

parndt commented Aug 29, 2012

The issue is a month old so I doubt it

@ugisozols
Copy link
Member

I just tried it and the issue is still there.

@parndt parndt closed this as completed in 22f6cff Sep 16, 2012
parndt pushed a commit that referenced this issue Sep 16, 2012
parndt pushed a commit that referenced this issue Sep 19, 2012
Conflicts:
	resources/app/views/refinery/admin/resources/_records.html.erb
parndt pushed a commit that referenced this issue Sep 19, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants