Embedded Setup value changes

dpaule

Joined: 2003-10-07
Posts: 30
Posted: Wed, 2008-01-30 16:41

After entering the correct value ("/"; which seems to work fine) in the "Please enter the Url to your environment" within the "Embedded Setup" "URL Rewrite Administration" tab, value I enter will change to "/http://www.CreativeCrib.com/" without my input. It usually occurs after I've added an image into an album through WPG2.

Any reason for this?

Thanks!

 
ozgreg
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Wed, 2008-01-30 21:48

Actually what you are describing does not make sense as adding an image (or album) does not alter any embedded path values. The only time that value is altered is during WPG2 Rewrite Tab validation via the WPG2 G2 Rewrite Tab. The path value is automatically obtained from Wordpress so unless your Wordpress FILE installation thinks it is /http://www.CreativeCrib.com/ then I cannot see how the "http://www.CreativeCrib.com/" value is obtained, it looks to me that the value "/" is being correctly determined by the WP/WPG2 plugin and somehow http://www.CreativeCrib.com/ is being appended by some other external process?

____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo

 
dpaule

Joined: 2003-10-07
Posts: 30
Posted: Wed, 2008-01-30 22:25

You're right. When ever I visit the "WPG2 Validation Check" it changes the rewrite rule. Do you have any ideas where "http://www.CreativeCrib.com/" might be added from?

 
ozgreg
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Thu, 2008-01-31 02:05

The path (/) is being determined in this piece of code located in the wpg2embed.inc

// Find the File Path of WP

$wphome = get_option( 'home' );
if ( $wphome != '' && $wphome != get_option( 'siteurl' ) ) {
$file_path = parse_url( $wphome );
$file_path = $file_path['path'];
$wproot = str_replace( $_SERVER["PHP_SELF"], '', $_SERVER["SCRIPT_FILENAME"] );
$file_path = trailingslashit( $wproot.$file_path );
} else {
$file_path = ABSPATH;
}

Followed by..

// Set the G2 rewrite Values
$params['embeddedLocation'] = $site_path;
$params['embeddedHtaccess'] = $file_path;

in Gallery2 -> Site Admin -> URL Rewrite what values can you see for

Absolute path to the folder of your embedded .htaccess
Please enter the Url to your environment.

____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo

 
dpaule

Joined: 2003-10-07
Posts: 30
Posted: Fri, 2008-02-01 12:40

Is there a way to prevent the http://www.CreativeCrib.com url from being added without breaking the wpg2embed.inc?

Thanks for your help.

 
ozgreg
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Fri, 2008-02-01 23:42

What settings does the WPG2 propose for

Absolute path to the folder of your embedded .htaccess
Please enter the Url to your environment.

(You can see these in Gallery2 -> Site Admin -> URL Rewrite)

____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo

 
dpaule

Joined: 2003-10-07
Posts: 30
Posted: Wed, 2008-04-16 21:50

ozgreg,

I appreciate your reply. Though I still don't understand how to prevent the rewrite rule from breaking. Need a screen shot?

Thanks

 
ozgreg
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Thu, 2008-04-17 00:49

Yeah that be good... I made some changes to the base Rewrite FILEPATH detection in WPG2 3.05 which might also fix your issue

____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo

 
dpaule

Joined: 2003-10-07
Posts: 30
Posted: Thu, 2008-04-17 10:22

In the mean time? Where might 3.05 be? Thanks.

 
ozgreg
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Thu, 2008-04-17 11:30

Be in development, look at the sticky thread up the top of the forum... Not long now..

____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo

 
sanaking

Joined: 2007-07-27
Posts: 12
Posted: Mon, 2008-12-01 10:01

I'm still having this same issue in WPG v3.0.7

It's quite annoying because https://site.name/ gets added to Every line of my .htaccess files.
(Incidentally, I use my site in https but only pass out the http url, which is also what I put in WP's setup.. this might cause part of the confusion?)

Interestingly, this doesn't break the site in obvious ways, but requests to grab any item (e.g. album /v/2007) will result in the Gallery main page showing up.

(Not the hugest deal, just annoying as I have to edit my htaccess files (in / and the gallery2 dir) pretty much Every time I touch the wpg2 settings.. I'm now trying to figure out how to get gallery to not think my site url is https:// but it is non-obvious.. it didn't used to think this.. *sigh*)

tata/TIA! -@

(hope no one minds me bumping an old thread, but since it's still relevant, I figure its okay..)

--
http://AToTheT.org/