Replacing of URL References to Asset Failing
-
Where it’s not replacing the URLs:
In a taxonomy page, in the term meta.
We use a builder.
The builder stores the taxonomy page content in the {wp_table_prefix}_termmeta as serialized data.
The URLs are not being replaced in this term meta when the “Replace the file, use new file name and update all links” option is set.
Wouldn’t imagine this to be uncommon with builders so was hoping we could figure this out together.
Let me know!
-
Hi Stephen,
Could you please elaborate on the issue?
- What builder do you use?
- What steps do we have to follow to replicate the issue?
Thanks!
Hi Gerard,
The builder is a proprietary builder but the concept is similar to that of other builders.
To replicate this issue without having our builder, you could just add meta to the
{table_prefix}_termmeta
where themeta_key
isseg_builder
and themeta_value
is serialized data that contains a URL that points to one of your assets your replacing. Could be anything. This is our serialized datab where it is not updating the URL references to our asset:a:3:{s:8:”settings”;a:1:{s:8:”template”;s:0:””;}s:7:”lHvCKe2″;a:8:{s:2:”id”;s:7:”lHvCKe2″;s:7:”element”;s:5:”links”;s:9:”locations”;s:7:”content”;s:5:”title”;s:0:””;s:7:”dynamic”;s:0:””;s:8:”view_all”;s:0:””;s:14:”view_all_label”;s:11:”HR Policies”;s:6:”fields”;a:44:{s:7:”U7z5tf2″;a:3:{s:4:”name”;s:50:”Americans with Disabilities Act Compliance Policy “;s:4:”link”;s:87:”https://example.com/policies/americans-with-disabilities-act-compliance-policy/”;s:6:”target”;b:1;}s:7:”ifJ8tf2″;a:3:{s:4:”name”;s:25:”Associate Contests Policy”;s:4:”link”;s:87:”https://example.com/wp-content/uploads/2020/07/Associate-Contests-Policy-v1.pdf”;s:6:”target”;b:1;}s:7:”xVN8tf2″;a:3:{s:4:”name”;s:18:”Associate Handbook”;s:4:”link”;s:78:”https://example.com/wp-content/uploads/2020/07/Associate20Handbook.pdf”;s:6:”target”;b:1;}s:7:”1Ze9tf2″;a:3:{s:4:”name”;s:48:”Associate No Solicitation No Distribution Policy”;s:4:”link”;s:110:”https://example.com/wp-content/uploads/2020/07/Associate-No-Solicitation-No-Distribution-Policy-v3.pdf”;s:6:”target”;b:1;}s:7:”C659tf2″;a:3:{s:4:”name”;s:65:”Attendance and Punctuality – Non-Retail Hourly Non-Exempt Policy “;s:4:”link”;s:124:”https://example.com/wp-content/uploads/2020/07/Attendance-and-Punctuality-Non-Retail-Hourly-Non-Exempt-Policy-v1.pdf”;s:6:”target”;b:1;}s:7:”D7mBtf2″;a:3:{s:4:”name”;s:61:”Attendance and Punctuality Policy – Retail Hourly Non-Exempt “;s:4:”link”;s:116:”https://example.com/wp-content/uploads/2020/07/Hourly-Non-Exempt-Attendance-and-Punctuality-Policy-v-1.0.pdf”;s:6:”target”;b:1;}s:7:”7TMBtf2″;a:3:{s:4:”name”;s:23:”Background Check Policy”;s:4:”link”;s:85:”https://example.com/wp-content/uploads/2020/07/Background-Check-Policy-v3.pdf”;s:6:”target”;b:1;}s:7:”L0VWyf2″;a:3:{s:4:”name”;s:24:”Bereavement Leave Policy”;s:4:”link”;s:89:”https://example.com/wp-content/uploads/2020/07/Bereavement-Leave-Policy-v-4.2.pdf”;s:6:”target”;b:1;}s:7:”VMZWyf2″;a:3:{s:4:”name”;s:25:”Cell Phone Program Policy”;s:4:”link”;s:89:”https://example.com/wp-content/uploads/2020/07/Cell-Phone-Program-Policy-v1.0.pdf”;s:6:”target”;b:1;}s:7:”XNmXyf2″;a:3:{s:4:”name”;s:35:”Code of Ethics and Business Conduct”;s:4:”link”;s:99:”https://example.com/wp-content/uploads/2020/07/Code-of-Ethics-and-Business-Conduct-v3.6.pdf”;s:6:”target”;b:1;}s:7:”1b5Xyf2″;a:3:{s:4:”name”;s:24:”Corrective Action Policy”;s:4:”link”;s:62:”https://example.com/policies/corrective-action-policy/”;s:6:”target”;b:1;}s:7:”XPq2zf2″;a:3:{s:4:”name”;s:32:”Dress Code and Appearance Policy”;s:4:”link”;s:70:”https://example.com/policies/dress-code-and-appearance-policy/”;s:6:”target”;b:1;}s:7:”TsJ2zf2″;a:3:{s:4:”name”;s:31:”Drug and Alcohol Testing Policy”;s:4:”link”;s:93:”https://example.com/wp-content/uploads/2020/07/Drug-and-Alcohol-Testing-Policy-v3.pdf”;s:6:”target”;b:1;}s:7:”roW2zf2″;a:3:{s:4:”name”;s:35:”Equal Employment Opportunity Policy”;s:4:”link”;s:100:”https://example.com/wp-content/uploads/2020/07/Equal-Employment-Opportunity-Policy-v.2.1.pdf”;s:6:”target”;b:1;}s:7:”0fl3zf2″;a:3:{s:4:”name”;s:26:”Form I-9 Compliance Policy”;s:4:”link”;s:100:”https://example.com/wp-content/uploads/2020/07/Equal-Employment-Opportunity-Policy-v.2.1.pdf”;s:6:”target”;b:1;}s:7:”hH23zf2″;a:3:{s:4:”name”;s:61:”Full-Time Hourly Store Associate Vacation and Sick Pay Policy”;s:4:”link”;s:123:”https://example.com/wp-content/uploads/2020/07/Full-Time-Hourly-Store-Associate-Vacation-and-Sick-Pay-Policy-v1.pdf”;s:6:”target”;b:1;}s:7:”7vG3zf2″;a:3:{s:4:”name”;s:69:”Full-Time Hourly Store Support Associate Vacation and Sick Pay Policy”;s:4:”link”;s:131:”https://example.com/wp-content/uploads/2020/07/Full-Time-Hourly-Store-Support-Associate-Vacation-and-Sick-Pay-Policy-v1.pdf”;s:6:”target”;b:1;}s:7:”prZ3zf2″;a:3:{s:4:”name”;s:18:”Holiday Pay Policy”;s:4:”link”;s:83:”https://example.com/wp-content/uploads/2020/07/Holiday-Pay-Policy-v-4.1.pdf”;s:6:”target”;b:1;}s:7:”68g4zf2″;a:3:{s:4:”name”;s:40:”Holiday Pay Policy – Salaried Pharmacist”;s:4:”link”;s:100:”https://example.com/wp-content/uploads/2020/07/Salaried-Pharmacist-Holiday-Pay-Policy-v2.pdf”;s:6:”target”;b:1;}s:7:”Ivx4zf2″;a:3:{s:4:”name”;s:37:”Human Resources – Retention Schedules”;s:4:”link”;s:97:”https://example.com/wp-content/uploads/2020/07/Human-Resources-Retention-Schedules-v2.pdf”;s:6:”target”;b:1;}s:7:”zhG4zf2″;a:3:{s:4:”name”;s:16:”Jury Duty Policy”;s:4:”link”;s:81:”https://example.com/wp-content/uploads/2020/07/Jury-Duty-Policy-v-1.2.pdf”;s:6:”target”;b:1;}s:7:”n1s5zf2″;a:3:{s:4:”name”;s:23:”Leave of Absence Policy”;s:4:”link”;s:88:”https://example.com/wp-content/uploads/2020/07/Leave-of-Absence-Policy-v-2.3.pdf”;s:6:”target”;b:1;}s:7:”tSh6zf2″;a:3:{s:4:”name”;s:20:”Manual del Asociado “;s:4:”link”;s:78:”https://example.com/wp-content/uploads/2020/07/Manual-del-Asociado.pdf”;s:6:”target”;b:1;}s:7:”R6k6zf2″;a:3:{s:4:”name”;s:12:”Media Policy”;s:4:”link”;s:50:”https://example.com/policies/media-policy/”;s:6:”target”;b:1;}s:7:”Q5nMig2″;a:3:{s:4:”name”;s:23:”Minor Employment Policy”;s:4:”link”;s:61:”https://example.com/policies/minor-employment-policy/”;s:6:”target”;b:1;}s:7:”xY2Mig2″;a:3:{s:4:”name”;s:25:”Off-the-Clock Work Policy”;s:4:”link”;s:90:”https://example.com/wp-content/uploads/2020/07/Off-the-Clock-Work-Policy-v-2.0.pdf”;s:6:”target”;b:1;}s:7:”EpIMig2″;a:3:{s:4:”name”;s:16:”Open Door Policy”;s:4:”link”;s:81:”https://example.com/wp-content/uploads/2020/09/Open-Door-Policy-v-2.2.pdf”;s:6:”target”;b:1;}s:7:”j3OMig2″;a:3:{s:4:”name”;s:46:”Part-Time Hourly Associate Vacation Pay Policy”;s:4:”link”;s:110:”https://example.com/wp-content/uploads/2020/07/Part-Time-Hourly-Associate-Vacation-Pay-Policy-v1.1.pdf”;s:6:”target”;b:1;}s:7:”qPXMig2″;a:3:{s:4:”name”;s:45:”Personal Vehicle Reimbursement Program Policy”;s:4:”link”;s:110:”https://example.com/wp-content/uploads/2020/07/Personal-Vehicle-Reimbursement-Program-Policy-v-3.1.pdf”;s:6:”target”;b:1;}s:7:”kNjNig2″;a:3:{s:4:”name”;s:21:”Personnel File Policy”;s:4:”link”;s:59:”https://example.com/policies/personnel-file-policy/”;s:6:”target”;b:1;}s:7:”oEyNig2″;a:3:{s:4:”name”;s:48:”Pharmacy Salaried Associate Paid Time Off Policy”;s:4:”link”;s:110:”https://example.com/wp-content/uploads/2020/07/Pharmacy-Salaried-Associate-Paid-Time-Off-Policy-v1.pdf”;s:6:”target”;b:1;}s:7:”5o7Nig2″;a:3:{s:4:”name”;s:26:”Philosophy on Labor Unions”;s:4:”link”;s:91:”https://example.com/wp-content/uploads/2020/07/Philosophy-on-Labor-Unions-v.1.1.pdf”;s:6:”target”;b:1;}s:7:”a0XNig2″;a:3:{s:4:”name”;s:44:”Policy against Discrimination and Harassment”;s:4:”link”;s:109:”https://example.com/wp-content/uploads/2020/07/Policy-against-Discrimination-and-Harassment-v-2.1.pdf”;s:6:”target”;b:1;}s:7:”iHcOig2″;a:3:{s:4:”name”;s:47:”Possession of Firearms and Other Weapons Policy”;s:4:”link”;s:109:”https://example.com/wp-content/uploads/2020/07/Possession-of-Firearms-and-Other-Weapons-Policy-v3.pdf”;s:6:”target”;b:1;}s:7:”NonOig2″;a:3:{s:4:”name”;s:34:”Privacy and Confidentiality Policy”;s:4:”link”;s:72:”https://example.com/policies/privacy-and-confidentiality-policy/”;s:6:”target”;b:1;}s:7:”6aoPig2″;a:3:{s:4:”name”;s:31:”Reinstatement and Rehire Policy”;s:4:”link”;s:95:”https://example.com/wp-content/uploads/2020/07/Reinstatement-and-Rehire-Policy-v1.0.pdf”;s:6:”target”;b:1;}s:7:”HYvPig2″;a:3:{s:4:”name”;s:20:”Remote Worker Policy”;s:4:”link”;s:82:”https://example.com/wp-content/uploads/2020/07/Remote-Worker-Policy-v1.pdf”;s:6:”target”;b:1;}s:7:”4s8Pig2″;a:3:{s:4:”name”;s:39:”Salaried Associate Paid Time Off Policy”;s:4:”link”;s:103:”https://example.com/wp-content/uploads/2020/07/Salaried-Associate-Paid-Time-Off-Policy-v3.1.pdf”;s:6:”target”;b:1;}s:7:”WXGPig2″;a:3:{s:4:”name”;s:23:”Salary Deduction Policy”;s:4:”link”;s:85:”https://example.com/wp-content/uploads/2020/07/Salary-Deduction-Policy-v3.pdf”;s:6:”target”;b:1;}s:7:”EDPPig2″;a:3:{s:4:”name”;s:19:”Social Media Policy”;s:4:”link”;s:81:”https://example.com/wp-content/uploads/2020/07/Social-Media-Policy-v2.pdf”;s:6:”target”;b:1;}s:7:”T6RPig2″;a:3:{s:4:”name”;s:32:”Solicitation/Distribution Policy”;s:4:”link”;s:70:”https://example.com/policies/solicitation-distribution-policy/”;s:6:”target”;b:1;}s:7:”YXZPig2″;a:3:{s:4:”name”;s:18:”Tobacco Use Policy”;s:4:”link”;s:56:”https://example.com/policies/tobacco-use-policy/”;s:6:”target”;b:1;}s:7:”15hQig2″;a:3:{s:4:”name”;s:48:”Travel Time Pay for Non-Exempt Associates Policy”;s:4:”link”;s:105:”https://example.com/wp-content/uploads/2020/07/Travel-Time-Pay-for-NonExempt-Associates-v-3.1.pdf”;s:6:”target”;b:1;}s:7:”IQpQig2″;a:3:{s:4:”name”;s:25:”Workplace Violence Policy”;s:4:”link”;s:89:”https://example.com/wp-content/uploads/2020/07/Workplace-Violence-Policy-v1.2.pdf”;s:6:”target”;b:1;}}}s:7:”o8bEPe2″;a:7:{s:2:”id”;s:7:”o8bEPe2″;s:7:”element”;s:5:”links”;s:9:”locations”;s:7:”sidebar”;s:5:”title”;s:0:””;s:7:”dynamic”;s:7:”OSBWOe2″;s:8:”view_all”;s:0:””;s:14:”view_all_label”;s:18:”Quick Policy Links”;}}
Not sure why it’s not replacing – but wondered if it was one of these 2 things?
– It doesn’t replace the URL references in the{table_prefix}_termmeta
table; or
– It is struggling with the serialized data for some reason? The URL doesn’t consist of backslashes or anything unusual.Hi Stephen,
Enable Media Replace indeed doesn’t replace on other tables, just
posts
andpostmeta
. We’ll add this to our todo list, and we will internally discuss if and how we implement this.Thanks for the report!
Hi Gerard,
Just wanted to follow up. Was there a timeline for the discussion internally? Want to know what the team makes of it.
Curious as well, if this is a resource problem for your team – is this something we could throw money at for (to help fund) or make a merge request for ourselves assuming your team deems it’s in the best interest of the plugin? Appreciate all of the open-source contributions.
Best,
SteveHi Steve,
Unfortunately we don’t have any ETA; although we have talked about it.
This specific issue shouldn’t take a lot of work, so I don’t think we’ll need any extra help (but thanks for the offer!).
Hopefully, next version will have this included but I can’t promise anything ??
Cheers,
Hi there!
This is fixed in version 3.5.0, FYI ??
Have a good one!
- The topic ‘Replacing of URL References to Asset Failing’ is closed to new replies.