Hardcoded Component Image in Compiler? #65

Closed
opened 2017-04-02 23:03:02 +00:00 by mwweb · 4 comments
mwweb commented 2017-04-02 23:03:02 +00:00 (Migrated from github.com)

I've been debugging my component, and kept seeing, in the backend:

index.php:975 GET http://localhost/%22components//com_mostwantedrealestate//assets//images//component-300.png/%3Cspan 403 (Forbidden)
jquery-migrate.js:23 JQMIGRATE: Migrate is installed with logging active, version 1.4.1
%3Cspan:1 GET http://localhost/%22components//com_mostwantedrealestate//assets//images//component-300.png/%3Cspan 403 (Forbidden)

In my component I'm not using any image called "component-300", it is "MWR_3D_Box-right.png".

In looking through the compiler, it appears that that file name is hardcoded into \administrator\components\com_componentbuilder\helpers\compiler\e_Interpretation.php, on lines 3784, 3801, and 11034.

Was it by design that we need to have your image called component-300, or is this something that shouldn't be hardcoded?

Also with this, it's compiling that path incorrectly. In my case, it's compiling http://localhost/%22components, where that actual path is http://localhost/mwredev/%22components

I've been debugging my component, and kept seeing, in the backend: index.php:975 GET http://localhost/%22components//com_mostwantedrealestate//assets//images//component-300.png/%3Cspan 403 (Forbidden) jquery-migrate.js:23 JQMIGRATE: Migrate is installed with logging active, version 1.4.1 %3Cspan:1 GET http://localhost/%22components//com_mostwantedrealestate//assets//images//component-300.png/%3Cspan 403 (Forbidden) In my component I'm not using any image called "component-300", it is "MWR_3D_Box-right.png". In looking through the compiler, it appears that that file name is hardcoded into \administrator\components\com_componentbuilder\helpers\compiler\e_Interpretation.php, on lines 3784, 3801, and 11034. Was it by design that we need to have your image called component-300, or is this something that shouldn't be hardcoded? Also with this, it's compiling that path incorrectly. In my case, it's compiling http://localhost/%22components, where that actual path is http://localhost/mwredev/%22components

The image is renamed to that automatically. So its not really hard coded, it is converted. That error looks very weired.. sure think that something is simply not setup right. Where is this image being linked, in the component view right?

Here is the problem, none of the core developers of JCB are using windows and that could be the cause. Windows is nasty....

Can I not help you setup a Linux development environment, it is not that hard in a VBox. I am sure this will resolve most of the issue you are having. Take a look at this course by Jon Peck. This option keeps you in windows but developing on Linux.

The other option is that I setup a Windows box and run JCB on it for testing... but my time is very limited at the moment, and I really don't like windows. If I could help all who use JCB to leave windows I would. I use to be stuck in windows myself (due to adobe), until one day a friend helped me get free... so I am never looking back :) I use various distros from time to time, but the one I like the most is Ubuntu. You should think about it, but I know as a graphics designer you will be stuck with Adobe.

The way I deal with that is I run a windows vbox on my Ubuntu with adobe installed on it. But I have a huge PC so it has like 19.6 GiB memory with 1TB SSD hard drive... so it does not knows about the vbox. But I hardly use it these days... spend most of my time in the browser, code (Netbeans) and terminal so don't really need the adobe stuff.

The image is renamed to that automatically. So its not really hard coded, it is converted. That error looks very weired.. sure think that something is simply not setup right. Where is this image being linked, in the component view right? Here is the problem, none of the core developers of JCB are using windows and that could be the cause. Windows is nasty.... Can I not help you setup a Linux development environment, it is not that hard in a VBox. I am sure this will resolve most of the issue you are having. [Take a look at this course](https://www.lynda.com/Apache-tutorials/Up-Running-Linux-PHP-Developers/158372-2.html) by Jon Peck. This option keeps you in windows but developing on Linux. The other option is that I setup a Windows box and run JCB on it for testing... but my time is very limited at the moment, and I really don't like windows. If I could help all who use JCB to leave windows I would. I use to be stuck in windows myself (due to adobe), until one day a friend helped me get free... so I am never looking back :) I use various distros from time to time, but the one I like the most is Ubuntu. You should think about it, but I know as a graphics designer you will be stuck with Adobe. The way I deal with that is I run a windows vbox on my Ubuntu with adobe installed on it. But I have a huge PC so it has like 19.6 GiB memory with 1TB SSD hard drive... so it does not knows about the vbox. But I hardly use it these days... spend most of my time in the browser, code (Netbeans) and terminal so don't really need the adobe stuff.
ro-ot commented 2017-04-03 07:13:35 +00:00 (Migrated from github.com)

Check your paths in the global Options of JCB is it correctly setup there?

Check your paths in the global Options of JCB is it correctly setup there?
mwweb commented 2017-04-03 23:45:31 +00:00 (Migrated from github.com)

I just spent most of day setting up a VirtualBox running the following, then copied my tables, and custom items from custom folder, to the new vbox. I'll see if that changes anything.

PHP Built On Linux joomlatools 4.2.0-27
Database Version 5.5.47-0 ubuntu0.14.04.1
PHP Version 5.6.20-1+deb.sury.org~trusty+1
Web Server Apache/2.4.18 (Ubuntu)
WebServer to PHP Interface apache2handler
Joomla! Version Joomla! 3.6.5 Stable [ Noether ] 1-December-2016 22:46 GMT
Joomla! Platform Version Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT

I just spent most of day setting up a VirtualBox running the following, then copied my tables, and custom items from custom folder, to the new vbox. I'll see if that changes anything. PHP Built On Linux joomlatools 4.2.0-27 Database Version 5.5.47-0 ubuntu0.14.04.1 PHP Version 5.6.20-1+deb.sury.org~trusty+1 Web Server Apache/2.4.18 (Ubuntu) WebServer to PHP Interface apache2handler Joomla! Version Joomla! 3.6.5 Stable [ Noether ] 1-December-2016 22:46 GMT Joomla! Platform Version Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT

The new exporting feature should work best for moving data :)

I should have a patch out soon.

The new exporting feature should work best for moving data :) I should have a patch out soon.
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#65
No description provided.