default.php front-end view weird chars breaking dreamweaver #368
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: joomla/Component-Builder#368
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Steps to reproduce the issue
compile component and then view default.php from my talent site-view in an editor.
Expected result
View complete file without weird chars.
Actual result
Dreamweaver: code view ends when weird chars start.
BBEdit: weird chars visible in page.
System information (as much as possible)
Additional comments
Weird chars: J5����J5��������������������ÄÏ1������������0≈Ú����XK5������������K5����Z!������K5������������
default.php from installed component viewing in BBEdit showing weird chars.
default.php from installed component viewing in Dreamweaver CC 2018 ending file.
VIEW PHP CODE copied from JCB site-view tab into BBEDIT. Not showing any weird chars.
Interesting the site-views is really your own code right, so it is code you added. Can it be that you copied those weirded code into JCB? I have never seen that, ever....
That was what i was thinking but copying the code back out of JCB and into BBEdit it doesn't show. Only after compile it shows this. BTW view is showing just fine. no problem in the browser on the page. I deleted all white spaces after the closing
and have the <?php for start immediately after it. Then it shows weird stuff like this:`
Werkzaamheden
<?php ∞P5
Also copying the code from JCB into the default.php and saving it again doesn't copy the weird stuff with it.
All code in JCB gets stored as base64 in the database, as you can understand the reason behind that. So what I would do is take the code and past some and safe compile, and see what comes out, the moment you see the strange stuff is back look at the code you just added... there is the problem. I am no expert on why that happens, but I have my suspicion that the base64 exposes what ever is hiding in plane sight. This is not anything JCB is doing, as you can follow the code all across the compiler and see it simply decode the base64 and then adds it to the files... done. It must be in the into and out of base64 that this happens. Let me know what you find out...
i removed the code of the first for loop. Because the second one was working fine. And it still showing weird chars. Just different ones.
Then i added this before the <?php because that was still showing fine.
Well it now broke before the comment. see screens.
Reversing the base64 doesn't show anything weird in the code.
Ok this gets weirder and weirder. Removing the entire col-xs-12 div that was wrapping where the issue was happening the problem just shifts from line 407 to 411.
When i open the default.php i get an UTF-8 file is damaged or incorrectly formed error. Let me try and open it on the server see if the stuff is in there also. Otherwhise maybe my FTP client is at fault.
Hmm viewing the file from directadmin file manager doesn't show the weird stuff. So i guess it is a problem downloading it with FileZilla then? Never had it happen before. Happens since yesterday.
Also only with this specific file it happens. No other files have this issue. Well thought i just open a ticket just to make sure it's not related to JCB.
Another funny thing. When i download it first. It gets corrupted i guess is the right word.
I then copy the correct code back in and upload.
I then download it again and it is showing just fine. lol.
Well i guess just close it since seems to be some weird stuff happening on my side. Sorry for bothering!
No worries, I know we are high up in the stack and so let me know if you see any weird things.
just to be complete on the info. I fixed the issue by telling Filezilla to download the file in binary mode.