jmcameron / attachments

Attachments Extension for Joomla 3, 4, and 5
GNU General Public License v3.0
12 stars 19 forks source link

Adapt for joomla 5 + iframe size for add attachmets and delete attachements + versions for 4.0.1 #49

Closed JLTRY closed 2 months ago

JLTRY commented 2 months ago

@parapente could you please check this pull request so that we can merge and provide a release version 4.09.1

parapente commented 2 months ago

@JLTRY restrict_uploads_extensions looks like it wasn't changed in Joomla 5. It seems to be upload_extensions in Joomla versions <4 but in both Joomla 4 & 5 administrator/components/com_media/config.xml still refers to the restrict_uploads_extensions value. After applying the patch I cannot upload any kind of file in Joomla 5. Can you please post a link to the reference you used for this change?

Other than that the rest of the changes look ok.

parapente commented 2 months ago

Running with xdebug

$allowable = explode( ',', $cmparams->get( 'upload_extensions' ) ?? '');

returns an empty string every time in Joomla 5.

May I also suggest the "Xdebug helper" browser extension to help you debug php code? You will not have to hard code the xdebug ide string to test your code ;-)

JLTRY commented 2 months ago

HEllo

I was wrong My site is existing since joomla 3.0 and I think that the update did not change the field in my parameters in my database {"upload_extensions":"bmp,csv,doc,gif,ico,jpg,jpeg,odg,odp,ods,odt,pdf,png,ppt,swf,txt,xcf,xls,BMP,CSV,DOC,GIF,ICO,JPG,JPEG,ODG,ODP,ODS,ODT,PDF,PNG,PPT,SWF,TXT,XCF,XLS,zip", "upload_maxsize":"10", "file_path":"images", "image_path":"images","restrict_uploads":"1", "check_mime":"1", "image_extensions":"bmp,gif,jpg,png", "ignore_extensions":"", "upload_mime":"image\/jpeg,image\/gif,image\/png,image\/bmp,application\/x-shockwave-flash,application\/msword,application\/excel,application\/pdf,application\/powerpoint,text\/plain,application\/x-zip", "upload_mime_illegal":"text\/html"} On the frontpage the value restrict_upload_extensions is empty, I saw it while debugging I will overwrite the value so that it will work again for my site

For Xdebug I use notepad++ extension that needs the specific &XDEBUG_SESSION_START=test to be added to url I do not know this browser extension "Xdebug helper" I will check if it exists for firefox

I will update my commit to remove so the value upload_extensions Thank for your tests

parapente commented 2 months ago

The "Xdebug helper" extension helps set the value of XDEBUG_SESSION_START to whatever you want when you need to debug a site. It does this automatically to every request you initiate so it is easier that way. The extension exists for all major browsers. Xdebug for Firefox

JLTRY commented 2 months ago

The "Xdebug helper" extension helps set the value of XDEBUG_SESSION_START to whatever you want when you need to debug a site. It does this automatically to every request you initiate so it is easier that way. The extension exists for all major browsers. Xdebug for Firefox

Thank you for the information

JLTRY commented 2 months ago

@parapente I updated the pull to revert modifications for field restrict_uploads_extensions so that we can merge if you agree. I will provide a release 4.0.1

parapente commented 2 months ago

I believe we are ready to go

JLTRY commented 2 months ago

Thank you for merging I launch The makefile and provided a new release https://github.com/jmcameron/attachments/releases/tag/v4.0.1

parapente commented 2 months ago

Nice! Thank you @JLTRY! In the next version release, I think we should use 'make fixversions' to change the version of all packages at once. Otherwise, we will have to track independent version numbers for each part of the package which can be tricky.

JLTRY commented 2 months ago

yes I will do it for next release many thanks

JLTRY commented 2 months ago

I think we should somehow ask @jmcameron to update the joomla portal https://extensions.joomla.org/extension/attachments/ , to add the support for joomla 4 and Joomla 5

parapente commented 2 months ago

I'll send him an email to ask him for the change. Btw my email is in my profile if you'll ever need it.