Images not appearing after import

cmodern's picture
cmodern
Sun, 07/16/2017 - 13:21
#1
Images not appearing after import

Hi there, this probably has a simple fix, but I imported D8 sliders from another (identical) D8 site, and the layer configurations and text were all imported successfully. However, no images show up either in the front end or back end slide editor, even though all those images are showing up in the files directory, using the same path as they were before. How do I make the images show up in the sliders after import?

phuonght's picture
phuonght
Sun, 07/16/2017 - 23:16

Hi,

You can please send us your site admin account and FTP account by private comment. Our demo still works normally.

phuonght's picture
phuonght
Mon, 07/17/2017 - 04:10

We tried importing a slider to your site but it displays images normally. Which site you exported slide from? It uses same slider version as current site? Also, please check your export file (file zip) if there is any image. 

phuonght's picture
phuonght
Tue, 07/18/2017 - 04:22

We imported file to your site. You can please check.

We think problem occured because your file was too huge, we also had same problem when importing to our site and we had to split it into 2 smaller files. 

cmodern's picture
cmodern
Tue, 07/18/2017 - 18:24

Thank you Phuonght. I see that the images are showing up after your import, but all the hundreds of images were dumped into a single directory, often copied two or three times unnecessarily. Because of the sheer amount of slides and images (there will be 50 sliders, each with 5 to 10 slides) it's very important that the files remain organized each in their own slide's directory (I created a directory for each slide).

My original directory organization is still there with all their respective images in their place, but all those images are now replicated in that one parent directory, and when I delete them from the parent directory they stop showing up in the sliders again. Why is this? Doesn't each image layer remember the path to its respective file that I originally designated?

It would be a huge deal for me to have to redo all the images so that they are in their correct directories again. Could you please help figure out how to make it work without needing that manual labor? Thanks in advance.

phuonght's picture
phuonght
Wed, 07/19/2017 - 04:58

Function export import of Megaslider is used to import slider from one site to different site so you can see export file always has images to uload to the new site. Drupal has a image manager in that each image is registered under ID and MegaSlider uses this image ID but not path as your suggestion. 

In case your new website and old website have same content (example: a local site and a product site), you can try following solution: 

- on local, access phpmyadmin, export 2 tables (md_sliders, md_slides). On server, access phpmyadmin, delete 2 tables (md_sliders, md_slides) and import 2 tables from local.

- move rows of md-slider in table file_managed from local to server: some modules use table file_managed so we can not remove it completely from server and import a new one

  • on local : run command SELECT * FROM `file_managed` WHERE uri like '%public://md-slider-image/%' > in result page, check option 'Show all' > check "Check all" to select all rows > click link export (near delete button)

http://imgur.com/2N5WnzR

  • in export page, select custom, uncheck 'Add CREATE TABLE statement'.

after exporting, open file file_managed.sql to check content if there is not command "create table" but only rows of md-slider then you can import it to server. Or if there is command, you have to export again or edit file sql.  

  • on server : run command delete * FROM `file_managed` WHERE uri like '%public://md-slider-image/%' then import file file_managed.sql from local.

- upload images from local to server (having similar path)

cmodern's picture
cmodern
Thu, 07/27/2017 - 16:48

Hey Phuonght, sorry I did not have access the past week or so to my computer where my local site was to implement these instructions. But I implemented them now, thank you for being so detailed and clear in your instructions. It looks like everything worked with following the designated image paths, and the images are all showing up!

There was a formatting error that occurred from this process though, related to CSS output: although everything appears properly in the slide editor page, the front end shows all text as dark gray and in a very small fontsize, without any background color or padding. The slides are also taking a long time to load.

I tried unchecking the "Aggregate CSS files" box at /admin/config/development/performance and flushing all caches, but that didn't help.

Any ideas?

phuonght's picture
phuonght
Fri, 07/28/2017 - 04:37

Please check:
+ module md-slider on server  and on local must be the same
+ upload all the newest file css in folder md-slider-css to server
+ check table md_sliders on server and local if slid fields are the same or not
if slid fields of 1 silder are the same, slider on server will use custom css files uploaded from local, if not, on server, you have to go to edit each slide again to get custom css work
*if you import following our instruction above, slids on server and local are always the same, or if you import by default function of module is" import file zip" so server slid can be a bit different from local one in some cases such as adding new, removing slider on server
This problem occurs because the class name in file custom css is different from class in html frontend, you can fix by going to edit slider, click "save" to make module create new file css for silder then clear cache drupal
We tested with some sliders in your site and they all worked. However, we can not saved settings for slider food, please try fixing by saving slider food in local then upload file custom style from folder md-slider-css to server.

cmodern's picture
cmodern
Sun, 07/30/2017 - 20:40

Thank you Phuonght again for your detailed instructions. Looks like it worked! Looks all good now. Thank you!

cmodern's picture
cmodern
Thu, 08/03/2017 - 16:56

Hi Phuonght, sorry turns out the issues continue. I got all the styles I had implemented before to show up correctly, but all styles I add now are not showing up on the front end. Some problem with the CSS I guess. Could you take a look why?

phuonght's picture
phuonght
Thu, 08/03/2017 - 23:24

Hi,

We can not access your site but we think site has cache problem. Last time, we also had to cleared cache many times.
When you save one md-slider, module will create a file custom css, example md-slider-earth-layers.css , in frontend, path of style will be set to md-slider-earth-layers.css?cbvhd
after clearing cache successfully, the 'cbvhd' will be changed to another one. If it still the same, clearing cache is failed, you have to try again. 

So,
+check file custom css if there is new style. If not, please edit file, click save to add new style
+ in frontend, after clearing cache, if style still does not display, check clearing cache

Log in or register to post comments
Have More Idea?

We are here to build your website!

No Universal solution fits all special business requirements. Our experienced team is ready with ideas and state-of-the-art technical solutions to consult the best solution within your budget.