Skip to:
Content

Opened 7 years ago

Closed 7 years ago

#625 closed defect (fixed)

Plugin activation/ wponce troubles

Reported by: so1o Owned by: mdawaffe
Milestone: 0.8.2 Priority: normal
Severity: normal Version: 0.7.5
Component: Back-end Keywords: has-patch
Cc:

Description

the plugin page activation/deactivation does not work if the plugin is in a subdirectory...

Attachments (2)

Ticket-625.2.patch (962 bytes) - added by so1o 7 years ago.
patch for plugin and theme fix
Ticket-625.patch (1.4 KB) - added by so1o 7 years ago.
patch for plugin and theme fix

Download all attachments as: .zip

Change History (30)

comment:1 mdawaffe7 years ago

  • Owner set to mdawaffe
  • Status changed from new to assigned

Works fine for me.

Is it just one subdirectory deep in the hierarchy?

Are you running this on Windows? I thought the new code was meant to avoid all Unix v. Windows slash issues, but... :)

comment:2 so1o7 years ago

its just one sub dir..

my-plugins/x-dir/x.php

. what it does is asks for confirmation recurssively.

im running it on windows.. also one more thing.. everytime its adds more slashes to the dir so the first time it asks for confirmation the link shows

x-dir//x.php

the next time its

x-dir////x.php

comment:3 mdawaffe7 years ago

(In [789]) Fix? for plugin activation on windows. re #625

comment:4 mdawaffe7 years ago

so1o, can you try the above fix and see if it solves the problem?

comment:5 so1o7 years ago

no .. but interestingly this works...

$plugin = stripslashes(stripslashes(trim($_GET['plugin'])));

comment:6 so1o7 years ago

infact i just noticed im having this issue with the themes page also.. i think its the same slashes issue.

comment:7 so1o7 years ago

ok.. so here's the deal..

in many places we do this -

bb_nonce_url( add_query_arg( ..

this is causing the problem.

add_query_arg function converts \ to
. and internally bb_nonce_url calls add_query_arg so at the end of it we have four \s for each \.

michael.. thoughts?

comment:8 mdawaffe7 years ago

Are you running the WordPress script at the same time? If so, what version?

comment:9 so1o7 years ago

the installation is not integrated.

i had put in some debugging comments in the code.. it runs the add_query_arg from the wp_functions file.

just a sidenot we should change the calls to add_query_arg to bb_add_query_arg

comment:10 so1o7 years ago

duh.. please ignore my last 'sidenote'.. i was off my medication when i wrote the 'sidenote'

comment:11 mdawaffe7 years ago

so1o, what do the following functions return?

var_dump(get_magic_quotes_gpc());
var_dump(get_magic_quotes_runtime());

comment:12 mdawaffe7 years ago

Also, what do you get if you

var_dump(array_keys(bb_get_plugins()));

comment:13 so1o7 years ago

var_dump(get_magic_quotes_gpc());

gives

int(1)
var_dump(get_magic_quotes_runtime());

gives

int(0)
var_dump(array_keys(bb_get_plugins()));

gives

array(3) {
  [0]=>
  string(13) "anonymous.php"
  [1]=>
  string(37) "forum-moderators\forum-moderators.php"
  [2]=>
  string(9) "roles.php"
}

comment:14 mdawaffe7 years ago

(In [802]) add_query_arg() to [WP5193] re #625

comment:15 mdawaffe7 years ago

so1o, can you try that latest update to see if it works?

If it does, does it still work if you take out [789] (the stripslashes)?

comment:16 so1o7 years ago

actually it doesnt.. i'll try a couple of stunts of my own here..

comment:17 so1o7 years ago

ok....

dangit! it was a dud!

here is the patch!

comment:18 so1o7 years ago

  • Keywords has-patch added

so1o7 years ago

patch for plugin and theme fix

comment:19 so1o7 years ago

had the same problem in themes.. updated the patch

comment:20 so1o7 years ago

ok the final patch for this.. i promise!

so1o7 years ago

patch for plugin and theme fix

comment:21 mdawaffe7 years ago

I think this is all a result of a couple inconsistencies in add_query_arg()

#WP4084 and #WP4105

I'm going to wait until the dust settles on them.

comment:22 so1o7 years ago

sure thing.

comment:23 so1o7 years ago

this also messes up the pagination
get_page_number_links()

the url comes out as forum.php?id=1&page=%25_%25 and is forwarded to the paginate_links

which will not work.

comment:24 mdawaffe7 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [808]) add_query_arg() and urlencode_deep() from WP. Fixes #625

comment:25 mdawaffe7 years ago

so1o,

Can you verify this works on Windows too?

comment:26 so1o7 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Nope not working! investigation underway...

comment:27 mdawaffe7 years ago

  • Milestone changed from 1.0 to 0.8.2

comment:28 mdawaffe7 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

Think it was the same thing as #558

Marking as fixed.

Note: See TracTickets for help on using tickets.