Tips for uploading images in Sylius

After successfully downloading and installing the Sylius Symfony project, I encountered an issue when trying to upload an image file.

Specifically, the problem arose when attempting to add an image in /admin => Products => (after selecting one) Edit product => Media => Choose file.

Although I could see the image in the admin interface, clicking the 'save changes' button did not result in the image appearing anywhere – neither on the frontend nor backend. It was only accessible within a folder located at public/media/image/87/2c in my project directory.

This dilemma may be related to a configuration file error in liipimaginebundle, as there is a non-existent /media/cache directory specified.

Has anyone else who recently downloaded Sylius faced the same challenge?

Answer №1

After locating the file in the folder labeled media/image, it's important to check if the item is listed under Media for that specific product. To ensure visibility on the frontend, a type such as main should be assigned to indicate the main image.

If you encounter the same issue on , it could potentially indicate a bug that needs to be reported on the GitHub repository. However, if the issue does not occur on the demo admin site, it may be linked to your development or hosting setup. It would be beneficial to confirm by testing it on the demo admin first before making any further conclusions. I have attempted to replicate the issue on the demo without success.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Which specific button is selected out of a variable number of buttons?

In my database, I store an autoincrement id along with the location and date of each trip. The piece of code below helps me display the results of my query. $mysqli = new mysqli("localhost", "root", "password", "trip"); $result = $mysqli->query("SELECT ...

Executing a Codeigniter PHP function within a controller using Cron Jobs on cPanel every hour

Is it possible to run a PHP function in the controller every hour using cPanel Cron Jobs? During testing, I have decided to execute this function every minute. An example implementation is shown below: class Mycontroller extends CI_Controller { pu ...

Breaking up an array in PHP according to search outcomes

My dataset consists of a multidimensional array generated from a MySQL query that aggregates results by various groups and sums. The array details costtotal and hitcount for different variations of 'ad_type', 'click_status', and 'l ...

The WordPress administrator encounters the error message "Database selection is not available"

UPDATE: I just wanted to express my gratitude for all of your support, everyone. The issue was on the server side, but it has been successfully resolved and my website is now back up and running smoothly. Please take a moment to visit www.bestlappyforme.t ...

Incorporate a new element into your webpage using an AJAX call in Symfony 3, all without

I am currently working on implementing Symfony forms within a modal using AJAX to prevent page reloading every time an add/remove or update action is submitted. However, I am not very familiar with AJAX and unsure how to proceed. Can anyone provide guidanc ...

A tutorial on utilizing fopen in PHP to write text lines to a .txt file

Struggling with PHP code utilizing fopen to write text lines into a textarea and save them to a .txt file. Below is the code I've been working on, hoping to get some assistance! <?php session_start(); if (!isset($_SESSION['username&ap ...

Wordpress is having issues running jQuery

I've developed a function inside js/custom.js. The purpose of this function is to arrange posts in my Wordpress site by applying a class called articleAlign. This class will enhance the spacing between the article title and its excerpt, but only when ...

Utilize a nested query, only to find that the inner query returned null results

I am trying to retrieve data from a table in my database and then use that data in another select query. However, when I attempt this, my final query returns null. Can anyone help me figure out what I did wrong? $query = "SELECT * FROM `DBovervieuw` WHERE ...

Having difficulty submitting a form with ajax, while accomplishing the same task effortlessly without ajax

I have been experimenting with submitting a form using ajax to the same .php file. When I submit the form without ajax directly (form action), the database gets updated. However, when I try the same process with ajax, there is no change in the database. H ...

Symfony2 Redirecting to unauthorized page using access_denied_url

Looking to implement the access_denied_url parameter in my security.yml. The issue arises when I try to access /mon-equipement as an anonymous user, it continues redirecting me to /login. Below is my configuration in the security.yml file: security: ...

I currently have a form within a div that is part of a loop to showcase saved data. My objective is to identify any changes made in the form fields so I can detect them effectively

This code is located inside a loop <div class="card card-fluid"> @php $counterId++; $formId = 'startLog'.$counterId; @endphp {!! Form::open(['id'=>$formId,'class'=>'ajax-form','method& ...

Implementing a PHP back button to navigate through previous pages

Currently, I am in the process of coding a project. In this project, there are a total of 10 pages, each equipped with back and forward buttons. However, when I attempt to navigate using either javascript:history.go(-1) or $url = htmlspecialchars($_SERVER ...

How can I minimize the number of polymorphic methods in my MVC design?

Currently, I am tackling a challenge in creating an MVC framework using PHP, even though my primary expertise lies in Java. I am on the lookout for a solution that aligns with OOP principles and is easily adaptable to various programming languages. Within ...

"The submission of multiple forms does not properly update the MySQL database

I've encountered an issue with my function and first query working correctly but the second involves multiple form inputs like id[], urunad, birim... I'm using $_POST to pass data to the function. $id2 = $gid; $sid2 = $sid; $urunad2 = $urunad; ...

Move and place, editing tools

Is it possible to create a drag-and-drop editor similar to the one found in the form editor on wufoo.com? ...

What could the possible reason behind the malfunctioning of my prepared statements for the insert operation?

I recently discovered that using prepared statements is a more effective method than using deprecated ones. Despite my best efforts and online tutorials, I haven't had any luck getting this to work or finding the problem. That's why I'm her ...

Issues with PHP not retrieving selected radio button values

Currently, I am using a PHP webpage to generate a list of all files with a .264 extension in a specific folder. Once the file is selected, it is then sent to a command for video playback on a display connected to the computer. I have encountered some diff ...

Is there a way to specify a custom model type in lighthouse-php under a different name?

When working with the Lighthouse package for GraphQL in Laravel, I have a model named "ClassA" that needs a type declaration as "TypeA". What is the recommended best practice to achieve this? ...

Using Symfony2 to make an Ajax request in order to show a message based on a particular condition

As a novice in the realm of JavaScript and Ajax, I am struggling to find a way to display a message based on certain conditions. Let's consider a scenario where a user can adjust the quantity of a product they wish to purchase. While implementing thi ...

Help! I can't find the simplexml node anymore - how do I retrieve the attribute value?

After spending more than 6 hours, I'm finally reaching out for help with my issue. My goal is to retrieve the attribute value from a SimpleXMLElement: Below is the output of my var_dump: object(SimpleXMLElement)#5 (1) { ["@attributes"]=> array ...