#1
Hello all!

I am having kind of a weird issue, I don't quite understand why it is happening. Once I am logged into the admin side of Trongate, I attempt to edit a page listed in the CMS. I do get the "View Page" dialog popup. Then, I click "View Page In 'Edit' Mode". Then, I get the trongate-pages-dock to display on the page in the page's edit view. BUT, if I click on any of the buttons in the dock, the only thing that does anything is the back button.

So, I was going to go through the trongate pages files and see if somehow, something got changed or edited in a required file needed for the dock. But, this is where I get lost. I have no idea which files are responsible for building that dock.

The only thing I have really changed is some CSS changes. I don't know if that helps at all.

Any help anyone could offer would be greatly appreciated.
#2
Hi Josh, the Trongate pages dock is controlled by the JavaScript file. Not sure why you are having those issues. Maybe try sharing a bit more detail.
#3
Thank you for your response, Dafa!

I am not quite sure which JavaScript file you are referring to? You just simply said "the JavaScript file". Are you referring to the "dock_manager.js" javascript file, or something else?

More info you say? I am not sure what else I can do to describe what is happening... When I try to click on any of the options from the dock nothing happens. Except, the back button works but nothing else. I have even tried copying and pasting the js files for the Trongate Pages module from another Trongate project into the current one with no change in the dock at all.

Also, I suppose if worse comes to worse, I could rebuild the entire project since it is basically an empty site right now with only one unpublished "Test" page. But, I thought I would ask here first and see if it is some kind of file I just need to replace, before I have to do a full backup and replacement of the custom CSS. That was why I was wondering what were the complete files (js, views, controllers, etc) that have anything to do with the dock so I could try replacing those with working files and see if that is my issue. But, if the only file that builds the dock is a single js file, and it is the ones I already replaced, I am at a complete loss.

Any other ideas?
#4
Sorry for being so vague before. What I meant is that the dock for Trongate pages is all JavaScript broken up into individual script files. If you display the source on the Trongate pages view, you should see an array like this Also, open dev tools and do a hard reload to see if they are all loading properly. Another way is to create a new app and slowly import your code over to see where things may have gone wrong.
#5
Thank you for your response, Dafa!

I think I figured it out!

As it turns out, the problem wasn't with any of the core js files in the "trongate_pages" module (oddly enough).

The file causing all the issues was a file that wasn't loading called "app.js". Which, I didn't even think to check the "console" of the dev menu until you mentioned doing a hard reload.

This file normally lives in "public/js/app.js". I had moved most of the stray assets (css, js, themes, etc) into an "assets" folder inside public to kind of make resources easier to find. I thought I had repaired all the broken links to these resources by that very move, apparently I missed app.js's redirect to it's new home. Silly me!

P.S. Some parts of Trongate are a bit scattered about. If there ever is a new version of the framework, might I suggest having your resources compiled into an assets folder for public elements. This is made even more apparent with js and css being mixed in with some files as embedded code or embedded css. Embedded css and js gets really confusing to debug, when the file that loads these critical resources is so vague and really nothing to point you to where that code or stylesheet is. Preferrably, I would like to request seeing those resources placed in a separate file containing one script or one stylesheet at a time for each, then link to them in the file it goes to. For example, I have added the following to the top of ALL code (php, js, css), for easier debugging with different css, as needed of course:


Thanks again!
#6
Hi Josh, glad we found the issue. My thoughts were It was always going to be something that wasn't loading in, hence my suggestion to check the dev console and do a hard reset. Please close this thread off when you get a moment.

On your post script comments. Most people think v1 forever means Trongate is not being updated, well that can't be further from the truth. Trongate is always being updated, improved and evolving. It's just doing it without introducing breaking changes and avoiding the rewrite culture of all those other frameworks.

I do recall your previous post on moving assets into the public folder. For me that's a backwards step, as Trongate is designed to be modular and is not constrained like most MVC frameworks to place all their assets in one place. Trongate is a HAVC framework, where each module can have its own assets folder for drag and drop development. If that makes it hard for you to debug, I don't see it as an issue but more of a help to find where things belong.

Don't get me wrong, I'm not trying to tell you how to structure your app. If that works for you, that's fine. I'm just trying to point out this is intentional and not a 'messy' haphazard approach.

Cheers,
Simon