-
-
Notifications
You must be signed in to change notification settings - Fork 76
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
404 Error after upload #44
Comments
I just had this issue... so going to check this - first time I'm trying to figure out how this whole thing works... I guess I have to update the files downloaded by my composer require thingie with this new commit let me check |
Same issue for me, it's just returning a 404 |
Just wanted to pipe in - the link included here: #45 - fixed the 404 issue for me. I just copy/pasted the raw file and replaced the src/Http/Controllers/ImportController.php file from here: 8dd4796 .... so if you do that it should fix it... however that didn't solve "ALL" my problems because after I did that I could import - everything looks good on the import and it says 28 records imported successfully or whatever... but... nothing is imported! Hopefully the creator peeks in here - because this has a lot of potential for me and I'm sure the fix to my thing is fairly straightforward - btw for anyone experiencing this issue - let me know if doing what I recommended fixed your issue and if you encounter the "second" import issue I encountered (where everything works... but it doesn't really work if that makes sense) |
Thanks for the input everyone hopefully by getting traction the author will have a look soon. I tried your solution @HeadStudios but unfortunately it didn't work for me I still get 404 error. |
@alexWaterfront that's a shame... yes please keep me updated... I am one step ahead (404 page fixed.. imports not working) - but hoping to get resolution.. let's work together and keep each other informed - I'll be checking back here. |
My PR only prevents the 404, but the Resource causing it can't be configured when imported. The error goes all the way to NovaRequest's rulesForCreation method, but I can't pinpoint what's the difference between the Resources that are being imported successfully and those which are not |
Hm good point, I've only tried one Resource for import - I could technically try other Resources to see if the issue is with my resources.. like I could try and import some Users as that is like the default mode. I appreciate your PR though because copy/pasting that did help me get to the next step.. I don't know why this Debugbar or whatever it is won't show me the SQL query that is attempted to be performed on insert.. I'm new to Laravel and not the best at debugging - but you've given me the idea to test with other resources to try to pinpoint the problem down - and thank for rulesForCreation method to look at. Chrs. |
Got the same problem. I am getting a 404 error when uploading the csv file. |
Same |
Hmmmm.... interesting... because the resource I'm importing into - there's a chance that has a BelongsTo field to... or more so a BelongsTo function or something.. I will test without them and see what happens... but I know the table doesn't have any remote fields... what's interseting is that there's no error being made... and I am sooo bad at troubleshooting - like all this stuff you guys are saying - I have no idea how to check that out. On my end I just get a success message - actually I should post what happens on my side here soon.. I feel like I'm so close to a solution though (I even have a success page saying "38 contacts of 38 contacts have been imported" and stuff. |
If you used my solution, though, it will import, but the fields on the
Resource with the relationship won't show in the dropdown to map the fields
for import. That's because I simply short circuited the mapping function
when it throws any error.
…On Sun, 24 Jul 2022 at 23:57, HeadStudios ***@***.***> wrote:
Hmmmm.... interesting... because the resource I'm importing into - there's
a chance that has a BelongsTo field to... or more so a BelongsTo function
or something.. I will test without them and see what happens... but I know
the table doesn't have any remote fields... what's interseting is that
there's no error being made... and I am sooo bad at troubleshooting - like
all this stuff you guys are saying - I have no idea how to check that out.
On my end I just get a success message - actually I should post what
happens on my side here soon.. I feel like I'm so close to a solution
though (I even have a success page saying "38 contacts of 38 contacts have
been imported" and stuff.
—
Reply to this email directly, view it on GitHub
<#44 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB6DCUWLGK5KEL33I4C5IZLVVX7BDANCNFSM525NRA2A>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Yes I'll try and import to users or something with no relationships... the thing is the Resource I'm importing doesn't have any related id fields... like for example Contacts doesn't have any foreign id keys or anything fancy at the database level - https://share.getcloudapp.com/wbuXqE7e - ... so I'm just doing name, mobile, email. The thing is on the Model level I do have the following: ublic function campaign_contacts() { So it does belongsTo... but it doesn't have to.. I don't know if I'm making sense - I'm wondering if your mapping short circuits if on the model it has belongsTo... because I can create contacts without associating them (in fact I can't associate them on the creation in nova level) to campaign contacts or anything.. not sure if I described it correctly.. I can try removing that belongs to or campaign_contacts() function too and see if it works - but thanks for clarifying that it short circuits - just trying to figure out this mystery - any input much appreciated! |
Having the same issue, anyone working on this (aside from the above comments)? |
I might put this over to Fiverr and see if someone is willing to work and fix it... if I find a solution I'll come back here and share - you guys better throw me some pennies if I do though lol. |
Problem in NovaRequest in method resource by call in BelongsTo::associatableQueryCallable
Request can't get value $this->route('resource') because there is none. For resolve can use custom request with replacement this method. Example
I can't create a pull request right now, maybe later |
Wait.. so I just... find and replace that code and (theoretically) it should work? I will try tomorrow! |
Hola tengo el mismo problema. Gracias. |
Hello Spanish person. Had to translate what you said but yes excited about getting this fixed too. |
This crashed for me when I replaced this function in Nova... or am I meant to make another function? I'm trying to comment the abort part out to see if this puts the CSV import through.. I have no idea what I'm doing lol. |
This didn't help unfortunately :( any other input much appreciated - or if I'm doing something wrong. Chrs! |
My PR #47 |
Niiice! Just had a look - can't wait to try over on my side. Looking forward to it! |
Muchas gracias, esto funciona ;-) |
Sorry :( - just tried and it has not fixed my issue - I do import and just like before it says success records imported but when I go to look nothing has been imported :( |
Hello, it worked for me the second time, because I wasn't passing all the mandatory fields, try to pass all the fields that are mandatory and it will work for you. |
Hey, I have a contacts with only 3 fields (name, email, phone) - I pass all fields and it says success but no records imported :( |
It says Imported but... not really - https://share.getcloudapp.com/kpuW9qp1 - btw that #47 pull request did help! But... there's just no import happening despite it saying that is so.. yeh. |
@rafaelsmith no not for me but i could help you with the import you can contact me in discord if you want erkenzjordi#5675 |
Hey folks. Please if you can, share the relevant CSV import code, a sample of the CSV data you're trying to import and any relevant DB migrations and I will be more than happy to investigate and fix. It will be great if you could also let me know what version(s) of Nova and this plugin you've got installed. |
Yeh I had to hack core but I got it working to what I need - I basically did a conditional and I even modified drop downs and everything - I'm on Discord if you want to jump in - I'm in the Laravel group and can share what I did. But it seems like hte guy who made is around now so perhaps he can assist. |
The file very simple you can see here: https://gist.github.com/rafaelsmith/ed22e90be4c74e7945d8be3390aece63 Thanks in advance! :) |
Hi @simonhamp. Firstly, thanks for providing this package. Very usefully. I have tested it yesterday and ran into the issue described here. I tried all versions and 0.4.0 is the last working version for Nova 4. We are also running on Nova 4.21.0. Maybe this is helpful for you. |
It would be really great if this package worked! Has anyone made a working fork of this? |
I did get this working after modifying some stuff though I don't remember exactly what I did lol, I don't think I made a fork either. But I can confirm with some slight changes it does work. |
filter out supported fields from $fieldsCollection before getting fields? $fieldsCollection = $fieldsCollection->filter(fn (Field $field) => !($field instanceof BelongsTo)); excludeAttributesFromImport should do this? |
Hey mate any update for us? :) |
@rafaelsmith your file isn't a CSV... it's using semicolons. That's why it won't work... I've not configured it to support all of the weird and wonderful ways CSVs might be written... Can you change your data so that it does use commas? |
Thank you for your reply, unfortunately also after changing it to commas I get the same 404 error. |
@rafaelsmith why is the extension now |
I export CSV file directly from Google Sheets. |
Not working for |
@hamza-darvis which file did you pick to test (how many rows)? And which version of CSV import are you running? |
@simonhamp 5000 rows and I'm using CSV import version 0.6.4 with nova 4 |
I've having the same issue as @hamza-darvis on CSV import version 0.6.4 with Nova 4.0 |
|
@hamza-darvis Thanks. I will try to look at this soon |
Hello here, I have found this 404 come when I have BelongTo relation in one of my nova ressource |
#47 fixes this problem perfectly. Give it a go.
|
Hey guys, I had the same issue with getting a 404 error. Using the Nova Set the This may only be useful for some. |
After i click on choose file and i select a csv document
it just shows me a 404 error see image attached:
The text was updated successfully, but these errors were encountered: