default.php front-end view weird chars breaking dreamweaver #368

Closed
opened 2019-01-23 18:58:12 +00:00 by TLWebdesign · 11 comments
TLWebdesign commented 2019-01-23 18:58:12 +00:00 (Migrated from github.com)

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)

  • OS Name & Version: Centos 7
  • MySql Version: MariaDB 10.1.26
  • Apache Version: 2.4.35
  • PHP Version: 7.1.23
  • Joomla Version: 3.9.2
  • JCB Version: 2.9.8
  • Browser: N/A

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 bbedit
default.php from installed component viewing in Dreamweaver CC 2018 ending file.
default php from installed component viewing in dreamweaver cc 2019
VIEW PHP CODE copied from JCB site-view tab into BBEDIT. Not showing any weird chars.
view php copied from jcb site-view tab into bbedit

### 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) - OS Name & Version: Centos 7 - MySql Version: MariaDB 10.1.26 - Apache Version: 2.4.35 - PHP Version: 7.1.23 - Joomla Version: 3.9.2 - JCB Version: 2.9.8 - Browser: N/A ### 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 bbedit](https://user-images.githubusercontent.com/4402824/51629868-f92b9480-1f48-11e9-95f0-9281e3f0ce37.png) default.php from installed component viewing in Dreamweaver CC 2018 ending file. ![default php from installed component viewing in dreamweaver cc 2019](https://user-images.githubusercontent.com/4402824/51629878-fcbf1b80-1f48-11e9-9feb-e6bde510df2b.png) VIEW PHP CODE copied from JCB site-view tab into BBEDIT. Not showing any weird chars. ![view php copied from jcb site-view tab into bbedit](https://user-images.githubusercontent.com/4402824/51629882-ffba0c00-1f48-11e9-9954-dc19101632a2.png)

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....

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....
TLWebdesign commented 2019-01-23 19:20:02 +00:00 (Migrated from github.com)

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

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 </p> and have the <?php for start immediately after it. Then it shows weird stuff like this: `<p><strong>Werkzaamheden</strong></p><ul><?php ∞P5
TLWebdesign commented 2019-01-23 19:21:19 +00:00 (Migrated from github.com)

Also copying the code from JCB into the default.php and saving it again doesn't copy the weird stuff with it.

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...

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...
TLWebdesign commented 2019-01-23 19:31:15 +00:00 (Migrated from github.com)

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.
schermafbeelding 2019-01-23 om 20 25 53

Well it now broke before the comment. see screens.
schermafbeelding 2019-01-23 om 20 26 40

Reversing the base64 doesn't show anything weird in the code.

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. ![schermafbeelding 2019-01-23 om 20 25 53](https://user-images.githubusercontent.com/4402824/51631483-211cf700-1f4d-11e9-829e-e8d70f070a05.png) Well it now broke before the comment. see screens. ![schermafbeelding 2019-01-23 om 20 26 40](https://user-images.githubusercontent.com/4402824/51631613-76f19f00-1f4d-11e9-900b-faaa05a5459a.png) Reversing the base64 doesn't show anything weird in the code.
TLWebdesign commented 2019-01-23 19:37:50 +00:00 (Migrated from github.com)

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.

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.
TLWebdesign commented 2019-01-23 19:48:47 +00:00 (Migrated from github.com)

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.

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.
TLWebdesign commented 2019-01-23 19:52:32 +00:00 (Migrated from github.com)

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.

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.
TLWebdesign commented 2019-01-23 19:52:55 +00:00 (Migrated from github.com)

Well i guess just close it since seems to be some weird stuff happening on my side. Sorry for bothering!

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.

No worries, I know we are high up in the stack and so let me know if you see any weird things.
TLWebdesign commented 2019-01-24 09:22:09 +00:00 (Migrated from github.com)

just to be complete on the info. I fixed the issue by telling Filezilla to download the file in binary mode.

just to be complete on the info. I fixed the issue by telling Filezilla to download the file in binary mode.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: joomla/Component-Builder#368
No description provided.