rajendrapopuri05
Forum Replies Created
-
Forum: Plugins
In reply to: [Make Paths Relative] Make Paths Relative – DB ExportHi Sami,
I could see the below information after uninstalling this plugin in WordPress DB. Please advise, how to clear this information from DB.
{s:43:\”make-paths-relative/make-paths-relative.php
Since the settings enabled on GUI are not persistent after DB export from one machine to another, just wanted to try do a cleanup the plugin details in DB if any and planning to try with a fresh installation of this plugin on source and destination machines. Please advise.
Forum: Plugins
In reply to: [Make Paths Relative] Command Line OptionsHi Sami,
Actually I was asking this question to you.
Anyway I tested the activate and deactivate commands for this plugin but I don’t see any other options to enable or disable other settings showing on the GUI like Site Address, and select or unslect checkboxes.Thanks.
I see the below in the plugin code.
wp_localize_script(
‘ajax-load-more’,
‘alm_localize’,
array(
‘ajaxurl’ => admin_url(‘admin-ajax.php’),
‘alm_nonce’ => wp_create_nonce( “ajax_load_more_nonce” ),
‘pluginurl’ => ALM_URL,
‘scrolltop’ => $scrolltop,
‘ajax_object’ => array(‘is_single’ => true, ‘is_singular’ => true )
)
);Any changes are required to it?
I am sorry I didn’t understand this? Please advise, where and what changes needs to be done.
Thanks,
RajendraOkay.
The below is the snippet of code.
<script type=”text/javascript”>
function fetchsearchresults(){
if(jQuery(‘#keyword’).val().length > 3){
jQuery.ajax({
url: ‘<?php echo admin_url(‘admin-ajax.php’); ?>’,
type: ‘post’,
data: { action: ‘data_fetch’, keyword: jQuery(‘#keyword’).val() },
success: function(data) {
jQuery(‘#search_results’).html( data );
jQuery(‘.search_nav’).fadeIn();}
});
}}
</script>I used “Make Paths Relative” plugin to make absolute URL’s to relative but few are left with absolute URL’s and the one is the above one. Not sure how to overcome this issue.
Hi Dcooney,
My WP production environments are front-end by Nginx Load balancer, the real issue is WP environments machine names and ports are appearing in the browser view:page source instead of blog dns name or blog URL. As part of security, I would like hide or eliminate the machines names in the browser source. Please advise, any solution to this issue.
Thanks,
RajendraHi Sami,
Thanks for your reply.
Is any alternate way to use admin-ajax.php file? so that hostname and ports can be hidden in the view-page source. Please advise.Thanks,
RajendraHi Sami, the code used in the themes funtions.php is as below.
<script type=”text/javascript”>
function fetchsearchresults(){
if(jQuery(‘#keyword’).val().length > 3){
jQuery.ajax({
url: ‘<?php echo admin_url(‘admin-ajax.php’); ?>’,
type: ‘post’,
data: { action: ‘data_fetch’, keyword: jQuery(‘#keyword’).val() },
success: function(data) {
jQuery(‘#search_results’).html( data );
jQuery(‘.search_nav’).fadeIn();}
});
}}
</script>This is causing absolute URL’s are appearing in the java scripts functions in view page source as below.
https://<hostname>:<port>/blog/wp-admin/wordpress/wp-admin/admin-ajax.php’,Please let me know any changes required to it in order to make urls’ relative by the plugin. Thanks in advance.
Rajendra
Forum: Plugins
In reply to: [Make Paths Relative] Make Paths Relative – DB Exportwp
Forum: Plugins
In reply to: [Make Paths Relative] Make Paths Relative – DB ExportHi Sami,
Actually the blog which I am working on is not in the public domain.
I am working for an organization, setting up WP environments for a project. I am facing this issue only with lower (Dev, test, and stage) environments. I don’t see any issue with prod servers after DB export, and content deployment to them. I am really not sure what was the issue with lower environments, but it is true that the setting enabled in the source environments are not appearing in the target environments (dev>>test>>stage). Please let me know if anything else I need to check.Thanks,
RajendraForum: Plugins
In reply to: [Make Paths Relative] Make Paths Relative – DB ExportHi Sami,
Any suggestions to retain the settings in the target environment after WP Deployment that were enabled in the source environment?In my case the deployment consists of DB export and copy/rsync wp-content folder from source environment to the target environment.
Please advise.
Thanks,
RajendraForum: Plugins
In reply to: [Make Paths Relative] Make Paths Relative – DB ExportHi Sami,
It was a typo. Originally there was no duplicate protocol in the SQL query result.
Here is the latest update. Since the plugin details are storing in DB, need to replace the source environment site_url by the target environment site_url. I have updated my shell script to replace the site_url by the target environment site_url, and loading the dump file into target environment DB. Now I see the settings are disabled, and the Site Address is blank in the target environment WP console. I tried by not replacing the site_url in the source DB dump file, site_url and the settings are enabled in the source environment are remain intact on the target environment too. That means if my shell script replace the source environment site_url by the target environment site_url settings are not enabling and site_url field is blank on the target environment after DB export. Also, here is the SQL query result.Before DB Deployment
====================
| 431 | make_paths_relative | s:313:”a:9:{s:8:”site_url”;s:32:”https://<hostname>:<port>”;s:15:”post_permalinks”;s:2:”on”;s:15:”page_permalinks”;s:2:”on”;s:18:”archive_permalinks”;s:2:”on”;s:17:”author_permalinks”;s:2:”on”;s:19:”category_permalinks”;s:2:”on”;s:11:”scripts_src”;s:2:”on”;s:10:”styles_src”;s:2:”on”;s:11:”image_paths”;s:2:”on”;}”; | yes |
After DB Deployment:
====================
| 431 | make_paths_relative | s:313:”a:9:{s:8:”site_url”;s:32:”https://<hostname>:<port>”;s:15:”post_permalinks”;s:2:”on”;s:15:”page_permalinks”;s:2:”on”;s:18:”archive_permalinks”;s:2:”on”;s:17:”author_permalinks”;s:2:”on”;s:19:”category_permalinks”;s:2:”on”;s:11:”scripts_src”;s:2:”on”;s:10:”styles_src”;s:2:”on”;s:11:”image_paths”;s:2:”on”;}”; | yes |
Suppose if Manually update the site_url and enabled settings after the DB deployment the query result is as below.431 | make_paths_relative | s:322:”a:9:{s:8:”site_url”;s:41:”https://<hostname>:<port>”;s:15:”post_permalinks”;s:2:”on”;s:15:”page_permalinks”;s:2:”on”;s:18:”archive_permalinks”;s:2:”on”;s:17:”author_permalinks”;s:2:”on”;s:19:”category_permalinks”;s:2:”on”;s:11:”scripts_src”;s:2:”on”;s:10:”styles_src”;s:2:”on”;s:11:”image_paths”;s:2:”on”;}”; | yes
Note: The settings I chosen in the source environment are just enabled all the check boxes (Make Permalinks Relative, Make Scripts and Styles Relative, Make Image Paths Relative) and provided site_url as https://<hostname>:<port>.
2) In my case the source environment is running with no ssl where as the target environment is running with https, so my shell script will replace the protocol while processing the dump file.Please let me know if you need anymore details. Thanks in advance for your support.
Rajendra
- This reply was modified 7 years, 1 month ago by rajendrapopuri05.
- This reply was modified 7 years, 1 month ago by rajendrapopuri05.
Forum: Plugins
In reply to: [Make Paths Relative] Make Paths Relative – DB ExportHi Sami,
I found the issue now, the values are resetting due to an field in the DB. Here is the SQL query output before and after DB deployment.
select * from wp_options where option_name='make_paths_relative'; | option_id | option_name | option_value | autoload | | 431 | make_paths_relative | s:323:"a:9:{s:8:"site_url";s:42:"https://<hostname>:<port>";s:15:"post_permalinks";s:2:"on";s:15:"page_permalinks";s:2:"on";s:18:"archive_permalinks";s:2:"on";s:17:"author_permalinks";s:2:"on";s:19:"category_permalinks";s:2:"on";s:11:"scripts_src";s:2:"on";s:10:"styles_src";s:2:"on";s:11:"image_paths";s:2:"on";}"; | yes | ========================================================================================= select * from wp_options where option_name='make_paths_relative'; | option_id | option_name | option_value | autoload | | 431 | make_paths_relative | s:322:"a:9:{s:8:"site_url";s:41:"https://https://<hostname>:<port>";s:15:"post_permalinks";s:2:"on";s:15:"page_permalinks";s:2:"on";s:18:"archive_permalinks";s:2:"on";s:17:"author_permalinks";s:2:"on";s:19:"category_permalinks";s:2:"on";s:11:"scripts_src";s:2:"on";s:10:"styles_src";s:2:"on";s:11:"image_paths";s:2:"on";}"; | yes |
See the s:41 and s:42 values before the URL. I noticed that it is a unique key as per table definition. Please advise, is this causing the issue? If so how to overcome this?
Thanks,
Rajendra- This reply was modified 7 years, 1 month ago by Jan Dembowski. Reason: Fixed formatting
Forum: Plugins
In reply to: [Make Paths Relative] Make Paths Relative – DB Exporthmmm. Settings enabled on the WP console are not appearing after DB export due to this the content is not generating relative URL’s. This has to be fixed other site may broken after DB deployment.
Thanks,
RajendraForum: Plugins
In reply to: [Make Paths Relative] Make Paths Relative – DB ExportHi Sami,
If I make the site_url to blank, my blog will not work as the blog content is generating with relative URL’s with no context root (‘blog’ is context root in my case). Also, as per the plugin documentation site_url is the default URL in db which doesn’t help. Hence I provided the site_url as https://<hostname>:<port> with no forward slash after port, which is working for me. However, plugin settings are reset after db export. Please advise.
Thanks,
Rajendra