#1
Hello Trongate Community
Todays question is on the photo uploader. I am working with the news module. I think I deleted the photo uploader and put one in with trongate app in the past(if that matters). For simplicity I just left pictures to load into/from module rather than changing to public. The photos are being saved, and I can find them in appropriate directory , links on page seem to point exactly where the photo is but yet the live page is showing a broken link, and JS is broken for delete modal it seems as well. Upload works fine.

Ive checked for GD, and found it in my phpinfo. I've followed the links, and compared, and can't see any discrepancy's. I just updated my Tg engine as well.
now getting:
#2
Hello Fin,

It is good to see you keep asking questions here, however, a bit sad no one else is jumping in to answer your questions ?

I know your post would make perfect sense to you but for others to follow your issue(s) may find it challenging. Could I ask you to please keep your posts clear?

Now let's take a look at what you have here:
1. You seem to be having an issue with the 'photo uploader', broken image links and JavaScript files.

2. You are working with the News Module.

3. You have confirmed the 'gd' php extension is loaded in your php.ini

4. You have just updated the Trongate engine and seeing deprecated warnings in Image.php on lines 453 and 463, also a header warning (which usually means a function was called that echoed something to the DOM but hasn't yet displayed it and then another echo in between).

- Can I suggest you install a fresh app using the Desktop app and then import your code over a module at a time, I think you may have corrupted your app by deleting things and upgrading it.

- I have just installed a new Trongate app and installed the News module and see there is an issue with method name changes from camel case to snake case.
1. Rename lines 523 and 524 in the news module to use snake case and also, lines 566, 571, 580 & 581.
2. There is also an issue with the protected save method in Image.php on line 219 - If you change that to Public it will work.

Otherwise, the News module seems to be working OK for me - no broken links, no JS errors, no deprecation warnings.

I'm on Windows - with a modified version Xammp running the latest versions of Apache/2.4.58 (Win64) OpenSSL/3.1.3 PHP/8.3.9, 10.4.32-MariaDB
#3
Thank you for considering my issue. You are right I have been working on this app for around six months. I need to create backups, and clear my db's and files and start fresh. I'll start by just putting the news module on my live server and see what happens
...So i started over with a fresh install of Trongate and the News module and followed the corrective steps mentioned above and without looking into this much my issue is now

Will look into this more in the morning

You can temporarily view my sites stats here> (https://finsgroupservicesllc.com/info.php)
#4
Today I tried enabling PHP FIleinfo module, it seems to be related to the mime_content_type method and was not installed. After a couple small debugs I am back where I started. implicit conversion warning converting float to integer. I think I will put my full app back online and see what happens now with Fileinfo enabled. I remember doing minor debuging on the News module, and really dont want to go through that again.
...Update: went back and put my original app back up- now that I have installed the PHP Fileinfo module via Easyapache in my WHM panel- All is working now.
Speaking from the past in July of 2024, I hope you future webdevs find help from this thread if you struggle with getting the Trongate single photo uploader working on your server. I am running Centos, on linux on a vps hostgator server, with PHP 8.2 or 3 something . Built my whole app on xxamp with vscode.

Thank you Trongate community for your guidance, today in the age of integrity, more than ever we need, no we deserve fast no-nonsense PHP frameworks like Trongate. Maybe I'm sounding too much like Dave but I too am sick of being nickel and dimed for ease of use in modern tech and regretting it later. In todays day modern tech should be fairly easy to use and accessible, and here you have it-Trongate. Finally.
#5
Hi Fin,

So very happy you got it all up and running and I had a peek at your site and loving what I see - well done!

Thanks for your questions and contibution to the Trongate community.

Cheers,
Simon

ps. catch you on the live stream or a furure help bar question ?