Trying to override pages from archive module I got error
Fatal error: require_once() [function.require]: Failed opening required '/var/www/core7/1/1' (include_path='.:/usr/local/zend/share/ZendFramework/library:/usr/local/zend/share/pear') in /var/www/core7/sites/d7tv/modules/pm_existing_pages/plugins/tasks/pm_existing_pages.inc on line 110
and debuged $arg
array (
0 =>
array (
'ti' => 'archive',
'pc' => 'archive_page',
'f' => 'archive.pages.inc',
'fp' => '',
'm' => 'archive',
),
1 => 'all',
2 => '2012',
3 => '2',
4 => '13',
)so usage of array_pop is wrong - needs array_shift() to shift off a first argument
same for content plugin
Fatal error: require_once() [function.require]: Failed opening required '/var/www/core7/1/1' (include_path='.:/usr/local/zend/share/ZendFramework/library:/usr/local/zend/share/pear') in /var/www/core7/sites/d7tv/modules/pm_existing_pages/plugins/content_types/pm_existing_pages.inc on line 51
| Comment | File | Size | Author |
|---|---|---|---|
| #18 | 1440068-17.patch | 4.05 KB | andypost |
| #15 | 1440068-15.patch | 2.81 KB | swentel |
| #5 | 1440068-pm_args2.patch | 2.35 KB | andypost |
| #5 | 1440068-interdiff.txt | 834 bytes | andypost |
| #4 | 1440068-pm_args.patch | 2.34 KB | andypost |
Comments
Comment #1
andypostThis fixes both places
Comment #2
andypostctools from git passes arguments same way as rc-1
Comment #3
andypostBy overriding user/register arguments are different
with additional arguments passed (arg1 and arg2)
user/register/arg1/arg2Suppose we need to store original "page arguments" in pm_args too
An open question is hook_update to this model
Comment #4
andypostI've added default menu 'page arguments' to special key and fixed both places to use them
Comment #5
andypostFixed comment wording
Comment #6
swentel commentedLooks good on a first glance, but I'll do some more testing this weekend before committing!
Comment #7
andypost@swentel this really broken, please drop some thoughts.
Comment #8
swentel commentedCommitted and pushed, thanks!
Comment #10
swentel commentedThis broke existing pages that previously worked, I need to revert this patch, do a new release first (it's a critical one in an implementation we have now) and recheck the code.
Comment #11
andypost@swentel please point a module that got broken and it's path that does not works with patch?
Probably we need some upgrade function if PM stores config with old values
Comment #12
swentel commentedWe had two examples with a project here at work:
- the authenticated user pages (although that works fine with the task that page manager itself comes with)
- apache solr search pages with a keyword: eg 'path/searchword'
I'm going to investigate this more tonight.
Comment #13
andypostI got troubles with Archive module because of it's usage of arguments
@swentel do you use apache solr itself or search_api_pages?
Comment #14
swentel commentedApache Solr itself. I'll experiment with the archive module as well.
Comment #15
swentel commentedInitial patch, works fine now for archive and for overriding user pages. Going to test this now with apache solr search pages.
The problem is that we can't be sure that the arguments we need for pmep are at the first or last position of the menu arguments.
Comment #16
swentel commentedOk works fine with apache solr pages now as well, I think this is good to go, but I'll wait until you have reviewed as well.
Comment #17
andypostI will debug this later today
Suppose this code needs a bit of commenting.
better use same variables name all over code
let's rename this or above
Comment #18
andypostAdded check for required arguments so preview does not throw warnings.
Added comment, not sure it's a good to search pmep argument by this way
Comment #19
swentel commentedWent for this one, will test this a very last time at work on monday on a project and then throw out a new release if all goes well.
Comment #20
andypostI seen some todo in doc-block in _pm_existing_pages_get_context_arguments() about _menu_load_objects()
Are you going to refactor this?
Comment #21
swentel commentedHmm, the function actually was passing the wrong arguments, fixed in http://drupalcode.org/project/pm_existing_pages.git/commitdiff/ae2b8a0f8...