WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.10.x) »
  • General Help & Support »
  • Change full pad images in WYSIWYG editor after change http to https?
  • Print
Pages: [1]   Go Down

Author Topic: Change full pad images in WYSIWYG editor after change http to https?  (Read 16582 times)

johnbroeckaert

  • Guest
Change full pad images in WYSIWYG editor after change http to https?
« on: January 12, 2018, 07:59:47 PM »
One of my clients has a site with more than 100 blog articles containing many images. He has wb 2.10 and php 7.1. Now this customer has requested an SSL certificate. In the WYSIWYG editor, each image shows the full path of the image
Code: [Select]
<p style = "text-align: center;">
<img alt = "" src = "http://www.example.com/media/luiseren.jpg" width = "80%" /> </ p>
<p> & nbsp; </ p>

My question is whether they should all be edited manually to HTTPS: // ??

Thank you
Logged

Offline crnogorac081

  • Posts: 2161
  • Gender: Male
Re: Change full pad images in WYSIWYG editor after change http to https?
« Reply #1 on: January 12, 2018, 09:25:43 PM »
maybe you can do this in output filter , to replace each http:// with https://
Logged
Web developer

Offline Luisehahne

  • WebsiteBaker Org e.V.
  • **
  • Posts: 4548
  • Gender: Male
Re: Change full pad images in WYSIWYG editor after change http to https?
« Reply #2 on: January 12, 2018, 11:00:19 PM »
In WebsiteBaker 2.11.0 all absolute Url will be replaced with a placeholder stored in the database
So it's no problem to change Domain.

In my view it were be usefull to have a tool who search all abs url and replace them with the placeholder.

I will be going to think about it

In Moment you have to call all wysiwyg, news sections, load the content and save.

Dietmar
Logged
Note: Once the code has been generated, it is easy to debug. It's not a bug, it's a feature!

Offline Ruud

  • Posts: 3671
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: Change full pad images in WYSIWYG editor after change http to https?
« Reply #3 on: January 12, 2018, 11:18:01 PM »
You can use a special header in Apache webservers to force the browser to use https for http sources.

Unfortunatly it is not supported by all browsers yet :-(  https://caniuse.com/#feat=upgradeinsecurerequests
Unsupported browsers will just do the same as always.

To use it, put the next line in your .htaccess
Code: [Select]
Header set Content-Security-Policy "upgrade-insecure-requests;"

Note that when external images are used, the external webserver must also allow https, otherwise the image is not shown  (no mixed content warnings though)


Ps.. using a droplet rewriting src="http://" to src="https://" would be a good trick too :-)
Logged
Dev4me - WebsiteBaker modules - WBhelp.org

Offline jacobi22

  • Betatester
  • **
  • Posts: 5920
Re: Change full pad images in WYSIWYG editor after change http to https?
« Reply #4 on: January 13, 2018, 01:38:57 AM »
pls take a look into the database in the wysiwyg table. do you found there any links in your content with {SYSVAR:AppUrl.MediaDir} (in WB 2.10 + WB 2.11) or {SYSVAR:MEDIA_REL} (in WB 2.8.3 SP6 + SP7)

these are the placeholders  (like the answer from Luisehahne)

since WB 2.10.0 there is a included function in the manual upgrade, that replace all WB_URL's from the database mod_wysiwyg-table into these Placeholders  (go to addons -> modules -> advanced -> manual upgrade -> choose wysiwyg and run)

with these placeholders inside the database you have to change only the WB_URL in config php

the news module use also this placeholders since WB 2.8.3 SP7, but has not this function to replace old hardcoded URL's in the database
Logged

Offline sky writer

  • Posts: 926
Re: Change full pad images in WYSIWYG editor after change http to https?
« Reply #5 on: January 13, 2018, 04:06:37 AM »
Quote from: johnbroeckaert on January 12, 2018, 07:59:47 PM
My question is whether they should all be edited manually to HTTPS: // ??

When I needed to do this for a website, I exported the site's database.  Then opened it in notepad++ and search and replaced all:
Code: [Select]
src = "http://with
Code: [Select]
src = "https://... or whatever string works best with your links.  Then I saved and imported back into the database.
Logged

johnbroeckaert

  • Guest
Re: Change full pad images in WYSIWYG editor after change http to https?
« Reply #6 on: January 13, 2018, 10:52:40 AM »
I think that for the time being I will choose the Skyrider solution. Seems to me the most logical and safe. I understand that there are no more problems in 2.11 but then we will at least have to wait until this is no RC anymore.

Ruud's solution also seems interesting to me, but it is not entirely clear how that should be done with a droplet.

Thank you for your reations (Y)
Logged

Offline jacobi22

  • Betatester
  • **
  • Posts: 5920
Re: Change full pad images in WYSIWYG editor after change http to https?
« Reply #7 on: January 13, 2018, 11:39:57 AM »
see my posting..... the URL was replaced automatically in the save-process since WB 2.8.3 SP6 in the wysiwyg module to  {SYSVAR:AppUrl.MediaDir} (in WB 2.10 + WB 2.11) or {SYSVAR:MEDIA_REL} (in WB 2.8.3 SP6 + SP7) and replaced back to the WB_URL (by output-filter), when in use (visible in back- or frontend) but only, if this URL in the Picture link is the same like the WB_URL.

Be carefull, if you use also URL's from foreign web adresses in your content, not every page use https, but a (global) search&replace replace everything and then, you have the risk for a dead-link


if you ask me....
Step 1:
start a manuel upgrade of the wysiwyg module

Step 2:
look into the database, table mod_wysiwyg, where do you have a usage from your WB_URL, remember there page_id && section_id and open this page in the wb-backend, save it and go to the next page
Logged

johnbroeckaert

  • Guest
Re: Change full pad images in WYSIWYG editor after change http to https?
« Reply #8 on: January 13, 2018, 12:15:09 PM »
Hi Uwe,

Your solution is working just fine. I over looked it at you forlast post but it is simple  and quick (Y) (Y)

THANK YOU
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.10.x) »
  • General Help & Support »
  • Change full pad images in WYSIWYG editor after change http to https?
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2