lizardmedia / product-attachments-magento2

Magento2 module for adding downloadable product attachments
MIT License
40 stars 37 forks source link

Backend url #14

Closed Naberdz closed 4 years ago

Naberdz commented 4 years ago

It seem that backend url is changed to backend_name from env.php in our case its backend + downloadable

so if i visit site/backend i get 404 but when i visit site/backend/downloadable i get admin login page.

all sections are affected by that backend/downloadable/cache/index

any idea on how to fix this ?

bartoszkubicki commented 4 years ago

Hello @Naberdz, I didn' encountered such an issue. Can you provide more guidelines how to reproduce this issue? Module shouldn't touch env.php file's values

Naberdz commented 4 years ago

Hallo @bartoszkubicki,

my env.php contains just standard magento specs it wasn't changed by plugin..

not sure what went wrong, maybe it has to do that it was a migration from M1 and was multistore and now it's a single store. Had to change because when user added attachment at store level to a product you where unable to open it got some error that title didn't exists.

so to prevent it had to change settings to use it as single store. Afterwards it became like that.

bartoszkubicki commented 4 years ago

@Naberdz today module has been tested against php 7.3 and magento 2.3.4. Please post exact error communicates and describe carefully how have you added attachments in backend

Naberdz commented 4 years ago

@bartoszkubicki Have found only this error: Uncaught TypeError: Return value of LizardMedia\\ProductAttachment\\Controller\\Download\\Attachment::loadAttachmentById() must implement interface LizardMedia\\ProductAttachment\\Api\\Data\\AttachmentInterface or be null, none returned in /home/pplazam2/domains/plafondplaza.nl/public_html/app/code/LizardMedia/ProductAttachment/Controller/Download/Attachment.php:110\nStack trace:\n#0 /home/pplazam2/domains/plafondplaza.nl/public_html/app/code/LizardMedia/ProductAttachment/Controller/Download/Attachment.php(71): LizardMedia\\ProductAttachment\\Controller\\Download\\Attachment->loadAttachmentById(19)\n#1 /home/pplazam2/domains/plafondplaza.nl/public_html/generated/code/LizardMedia/ProductAttachment/Controller/Download/Attachment/Interceptor.php(24): LizardMedia\\ProductAttachment\\Controller\\Download\\Attachment->execute()\n#2 /home/pplazam2/domains/plafondplaza.nl/public_html/vendor/magento/framework/App/Action/Action.php(108): LizardMedia\\ProductAttachment\\Controller\\Download\\Attachment\\Interc...\n

I don't add attachments.. client does.. as far as i see he adds them on global level or on store level.

when he sets it on store level default store has no values.
And we get error when trying to edit this product on global level. Can't seem to find this error. to solve that i make direct query and set store id to 0.

since i have changed it to single store mode this problem is not happening.

bartoszkubicki commented 4 years ago

@Naberdz now it's clear, I will check if I am able to reproduce an error, or make sure that it's not going to happen anymore.

bartoszkubicki commented 4 years ago

https://github.com/lizardmedia/product-attachments-magento2/pull/17

bartoszkubicki commented 4 years ago

@Naberdz please check if error still persits with actual codebase

Naberdz commented 4 years ago

Have updated plugin. for now i don't see any errors.

bartoszkubicki commented 4 years ago

@Naberdz thank you for your report. One bug less!