SYMFONY_ENV=prod composer update --no-dev

Questions around the Aimeos bundle for the Symfony framework
Forum rules
Always add your Symfony, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Seds
Posts: 34
Joined: 26 Jun 2018, 17:42

Re: SYMFONY_ENV=prod composer update --no-dev

Post by Seds » 17 Jul 2018, 20:58

OK
I pasted lines in /app/config/config.yml
Is it there i have to to do it?

because I didn't only change baseurl, I added all lines in configuration, they didn't exist already.
is it normal?

I made an update --no-dev
I changed / updated an image
made a cache:clear

url are ok now but image not appear in front

do you have some advices?
**

User avatar
aimeos
Administrator
Posts: 7866
Joined: 01 Jan 1970, 00:00

Re: SYMFONY_ENV=prod composer update --no-dev

Post by aimeos » 17 Jul 2018, 21:52

Is the image shown if you paste the URL into a new browser window? What's the HTTP status returned?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Seds
Posts: 34
Joined: 26 Jun 2018, 17:42

Re: SYMFONY_ENV=prod composer update --no-dev

Post by Seds » 19 Jul 2018, 17:55

first, I put in baseurl: localhost/shop/web to have a correct image url
then urls are good in source and when I past urls in browser images are shown

detail page:
source

Code: Select all

			<figure id="image-0"
				class="item" style="background-image: url('localhost/shop/web/files/5/6/566771890afc8e950092ca8d5d054dc4.jpg')"
				itemprop="image" itemscope="" itemtype="http://schema.org/ImageObject"
				data-image="localhost/shop/web/preview/2/3/23ea5ee0e3e1e2d2789e0287dd2f9564.jpg"
				 >
				<a href="localhost/shop/web/files/5/6/566771890afc8e950092ca8d5d054dc4.jpg" itemprop="contentUrl"></a>
				<figcaption itemprop="caption description">product1.jpg</figcaption>
			</figure>

.../...

		<a class="social-button social-button-pinterest"
			href="https://pinterest.com/pin/create/button/?url=http%3A%2F%2Flocalhost%2Fshop%2Fweb%2Fdetail%2F1%2FLevi%2527s_501&description=Levi%27s_501&media=localhost%2Fshop%2Fweb%2Ffiles%2F5%2F6%2F566771890afc8e950092ca8d5d054dc4.jpg"
			title="pinterest"
			target="_blank"
		></a>
network:

Code: Select all

Request URL: http://localhost/bundles/aimeosshop/themes/aimeos-detail.js
Request Method: GET
Status Code: 404 Not Found

Request URL: http://localhost/shop/web/detail/1/localhost/shop/web/preview/2/3/23ea5ee0e3e1e2d2789e0287dd2f9564.jpg
Request Method: GET
Status Code: 404 Not Found

Request URL: http://localhost/shop/web/detail/1/localhost/shop/web/files/5/6/566771890afc8e950092ca8d5d054dc4.jpg
Request Method: GET
Status Code: 404 Not Found

Request URL: http://localhost/bundles/aimeosshop/themes/aimeos-detail.js
Request Method: GET
Status Code: 404 Not Found
list page
source:

Code: Select all

<div class="media-list">
		<noscript>
			<div class="media-item" style="background-image: url('localhost/shop/web/preview/2/3/23ea5ee0e3e1e2d2789e0287dd2f9564.jpg')" itemscope="" itemtype="http://schema.org/ImageObject">
				<meta itemprop="contentUrl" content="localhost/shop/web/preview/2/3/23ea5ee0e3e1e2d2789e0287dd2f9564.jpg" />
			</div>
		</noscript>
	<div class="media-item lazy-image" data-src="localhost/shop/web/preview/2/3/23ea5ee0e3e1e2d2789e0287dd2f9564.jpg"></div>
</div>
network:

Code: Select all

Request URL: http://localhost/shop/web/localhost/shop/web/preview/2/3/23ea5ee0e3e1e2d2789e0287dd2f9564.jpg
Request Method: GET
Status Code: 404 Not Found
list/1/XXX
source:

Code: Select all

	<div class="catalog-stage-image">
	</div>
no error in network
but i have pictures in this category, one in stage type, an other in standard stage. and no trace of images in source

thanks
**

User avatar
aimeos
Administrator
Posts: 7866
Joined: 01 Jan 1970, 00:00

Re: SYMFONY_ENV=prod composer update --no-dev

Post by aimeos » 21 Jul 2018, 08:07

The URL .../shop/web/ must be the document root of your vhost. Then, the images are shown correctly. Putting the your Symfony installation in a sub-directory doesn't work without adapting the configuration.

Furthermore, you should use "http://localhost/" so it's not interpreted as a directory by the browser.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Seds
Posts: 34
Joined: 26 Jun 2018, 17:42

Re: SYMFONY_ENV=prod composer update --no-dev

Post by Seds » 25 Jul 2018, 18:34

Using http://localhost/ on detail :

Code: Select all

Request URL: http://localhost/bundles/aimeosshop/themes/aimeos-detail.js
Request Method: GET
Status Code: 404 Not Found

Request URL: http://localhost/preview/2/3/23ea5ee0e3e1e2d2789e0287dd2f9564.jpg
Request Method: GET
Status Code: 404 Not Found
**

User avatar
aimeos
Administrator
Posts: 7866
Joined: 01 Jan 1970, 00:00

Re: SYMFONY_ENV=prod composer update --no-dev

Post by aimeos » 26 Jul 2018, 21:20

As long as the directory " ./<yourapplication>/web/" is not the document root of your virtual host, it won't work.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Seds
Posts: 34
Joined: 26 Jun 2018, 17:42

Re: SYMFONY_ENV=prod composer update --no-dev

Post by Seds » 05 Aug 2018, 09:06

it's what i've done on #p6494 post

it doesn't work neither on url, or image display
**

User avatar
aimeos
Administrator
Posts: 7866
Joined: 01 Jan 1970, 00:00

Re: SYMFONY_ENV=prod composer update --no-dev

Post by aimeos » 06 Aug 2018, 21:09

Is the file in ./<yourapplication>/web/bundles/aimeosshop/themes/aimeos-detail.js available on the command line?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Seds
Posts: 34
Joined: 26 Jun 2018, 17:42

Re: SYMFONY_ENV=prod composer update --no-dev

Post by Seds » 07 Aug 2018, 10:04

i made an composer update, then on product page it works, image appears
but not on categories

yes file in ./<yourapplication>/web/bundles/aimeosshop/themes/aimeos-detail.js is available
no error anymore on command line
**

User avatar
aimeos
Administrator
Posts: 7866
Joined: 01 Jan 1970, 00:00

Re: SYMFONY_ENV=prod composer update --no-dev

Post by aimeos » 08 Aug 2018, 07:27

Please clear the content cache which may still contain the wrong URLs:

Code: Select all

./bin/console aimeos:cache
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply