Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0 Rows Replaced When Replacing URLs from MAMP Localhost to Live Site After Migration #1191

Closed
jeffreybetts opened this issue Jan 18, 2017 · 15 comments
Assignees
Milestone

Comments

@jeffreybetts
Copy link

Description

I just updated to the newest version of Elementor and was trying out the Replace URLs options in the Tools section. I entered in the old and new site URLs, and when I clicked Replace URL, I get a popup saying “0 Rows Affected”.

I first migrated the site using BackupBuddy, then ran the Replace URL tool. I am going from a local machine (URL is formatted like http://localhost:8888/folder/) to a staging site (URL is formatted like http://example.com).

Steps to reproduce

  1. Set up a site on a local environment (I use MAMP on OS X) with some pages built with Elementor that have images imported from the image library
  2. Add a text editor block with an image from the media library (use Add Media button in the editor)
  3. Migrate the site to a live domain (non-local)
  4. Use the Replace Tools feature in Elementor to replace the old localhost URL with the live site URL
  5. For the old URL (in my local environment) – http://localhost:8888/folder/ and for the new URL: http://example.com
  6. A popup is shown that "0 Rows Affected". No URLs were replaced

Environment

== Server Environment ==
Operating System: Linux
Software: Apache
MySQL version: 5.5.51
PHP Version: 5.4.45
PHP Max Input Vars: 1000
PHP Max Post Size: 64M
GD Installed: Yes
Elementor Library: Connected

== WordPress Environment ==

== Server Environment ==
Operating System: Linux
Software: Apache
MySQL version: 5.5.51
PHP Version: 5.4.45
PHP Max Input Vars: 1000
PHP Max Post Size: 64M
GD Installed: Yes
Elementor Library: Connected

== WordPress Environment ==
Version: 4.7.1
Site URL: http://example-staging.com
Home URL: http://example-staging.com
WP Multisite: No
Max Upload Size: 64 MB
Memory limit: 40M
Permalink Structure: /%year%/%monthnum%/%day%/%postname%/
Language: en-US
Timezone: 0
Debug Mode: Inactive

== Theme ==
Name: Twenty Fifteen
Version: 1.7
Author: the WordPress team
Child Theme: No

== User ==
Role: administrator
WP Profile lang: en_US
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_2) AppleWebKit/602.3.12 (KHTML, like Gecko) Version/10.0.2 Safari/602.3.12

== Active Plugins ==
ACF to REST API
Version: 2.2.1
Author: Aires Gonçalves

Admin Menu Editor
	Version: 1.7.3
	Author: Janis Elsts

Advanced Custom Fields
	Version: 4.4.11
	Author: Elliot Condon

BackupBuddy
	Version: 7.2.1.6
	Author: iThemes

Better REST API Featured Images
	Version: 1.2.1
	Author: Braad Martin

Caldera Forms
	Version: 1.4.7
	Author: CalderaWP

Custom Post Type UI
	Version: 1.5.1
	Author: WebDevStudios

Elementor
	Version: 1.1.5
	Author: Elementor.com

Elementor Pro
	Version: 1.0.8
	Author: Elementor.com

Export Featured Images
	Version: 1.0
	Author: timersys

FacetWP
	Version: 2.7.3
	Author: FacetWP, LLC

Instagram Feed
	Version: 1.4.8
	Author: Smash Balloon

MMT FacetWP Custom Hooks
	Version: 1.0
	Author: Jeffrey Betts

OSD Exclude From Search Results
	Version: 2.4
	Author: OSD Web Development Team

Post Lists View Custom
	Version: 1.7.4
	Author: gqevu6bsiz

Search & Replace
	Version: 3.1.2
	Author: Inpsyde GmbH

Shield
	Version: 5.6.0
	Author: iControlWP

WordPress Importer
	Version: 0.6.3
	Author: wordpressdotorg

WordPress Popular Posts
	Version: 3.3.4
	Author: Hector Cabrera

WP REST API
	Version: 2.0-beta15
	Author: WP REST API Team

WP REST API - filter fields
	Version: 1.0.5
	Author: Stephan van Rooij

WP REST API - Pure Taxonomies
	Version: 1.0
	Author: Andrew MAGIK

WP Site Protect
	Version: 1.0
	Author: Henrique Mouta
@matipojo
Copy link
Member

Hi @jeffreybetts,
The Replace URL tool handels only URLs in the Elementor data, for example images URLs, do you have now broken links/images in your Elementor pages?

@jeffreybetts
Copy link
Author

Yes, I do. After migrating the site to the live environment, I had broken image links for Elementor-built pages (used as background images and images that were added into text editor modules). I ran the Replace URLs to replace these image links and nothing was replaced.

@talesg
Copy link

talesg commented Jan 20, 2017

Just ran into this issue. It doesn't replace images set as backgrounds and overlays, apparently. My migration was between web hosts. The images from image-related modules were replaced correctly. Only images from backgrounds and bg overlays that weren't.

@matipojo
Copy link
Member

Can you save the problematic page as a template, and send it via export file?

@talesg
Copy link

talesg commented Jan 24, 2017

Hey @matipojo , did you saw my comment there?

I don't know if it's a separate issue from the original of this post, but i ran into it again in another site and had to manually change the backgrounds and overlays after migration.

Perhaps is just a matter of adjusting the code a little, since the replace function already exists, and set the replacement to affect backgrounds and overlays as well.

@jeffreybetts
Copy link
Author

I've attached the template JSON from two of the posts/pages I've had issues with migrating the URLs, using the Replace URLs feature. This was exported from my local machine.

elementor-urls-examples.zip

@matipojo
Copy link
Member

@jeffreybetts , what are the from/to URLs you try to replace?

@jeffreybetts
Copy link
Author

jeffreybetts commented Jan 25, 2017

Here are the URLs:
Old: http://localhost:8888/mmt-dev/
New: http://mmtstock-staging.com/

@matipojo
Copy link
Member

I don't see them in the export files.
Please try to regenerate the css files:
WP Admin -> Elementor -> Tools -> Regenerate CSS

@jeffreybetts
Copy link
Author

jeffreybetts commented Jan 26, 2017

I've re-exported/regenerated the files. They are attached. This was exported from the http://localhost:8888/mmt-dev/ environment.

elementor-template-exports-dev.zip

@dcnelson89
Copy link

Could it be that that URLs can't be found because of the escape characters used in JSON?

Plain text:
http://mmtstock.com.blog

JSON :
http:\/\/mmtstock.com\/blog\

Sorry to jump in, but i'm also having the same problem.

@matipojo
Copy link
Member

@jeffreybetts, I talk about "Regenerate CSS files" not the export files.
Some background images are stored also in the CSS files, and they need the be regenerate.

@matipojo
Copy link
Member

@dcnelson89, Our "Replace URL" tool takes the escaping in account.

@jeffreybetts
Copy link
Author

@matipojo I regenerated the CSS files in the Tools section and it had no effect.

I ran the replace URLs tool and regenerated the CSS files on my staging site, and background images/images in text editor blocks were still referring back to the local environment.

screen shot 2017-01-31 at 10 16 51 pm

@KingYes
Copy link
Member

KingYes commented Feb 1, 2017

Fixed by this PR: #1251

Will be release soon in v1.2.0.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants