Closed (fixed)
Project:
Views (for Drupal 7)
Version:
7.x-3.13
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
14 Jul 2012 at 21:54 UTC
Updated:
5 May 2022 at 01:09 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dawehnerYou might have to switch the localization backend to none/core again, which can be done under the advanced settings of views.
Comment #2
dawehnerUpdate status, whether you updated the value.
Comment #3
socialnicheguru commentedit is set to none
Comment #4
marcelovaniI have the same problem here. I thought that the fix on http://drupal.org/node/1252018 would fix it but unfortunately not.
I have created this patch for views_plugin_localization.inc, which I am using.
Please test.
Comment #5
kolyapatrik commentedThanks marcelovani. It work with this patch
Comment #6
dawehnerThank you for working on this particular problem!
What about if (!isset($this->view) || !($view instance View) || empty($this->view->localization_plugin)) and if that fails return and do nothing. This would really help to make the change as small as possible as well as keep it more readable.
Comment #7
marcelovani@dawehner sure thing, here is the patch.
Comment #8
q0rban commentedI don't think this is solving the real problem. For some reason, the localization plugin is being added to the view without actually getting init()ed.
Comment #9
q0rban commentedBumping to major as I can't even save a new view without this patch.
Attached patch looks bigger than it is. The biggest changes are that the init_localization() function now always returns the translate attribute from the localization plugin. If this attribute is not set, the plugin is loaded up and inited. This is true even for the views_plugin_localization_none plugin, whereas before, if that plugin was being used, it was not being inited. In addition, one other bug in the previous function is that if the localization plugin existed on the object, localization would be attempted even if the translate property was set to FALSE. So, the reason for the bug was two-fold:
Comment #10
mex30 commentedHi,
How should I use this patch?
I'm not very good to use Drupal.
Comment #11
mex30 commentedComment #12
betarobot commentedHare is a brief tutorial on applying patches: https://drupal.org/patch/apply
Comment #13
hnln commentedSame problem here. I only needed i18nviews to translate my exposed filters, the site already had a lot of translated views using core.
So I set the translation plugin to core after installing i18nviews, but I do use the (translated) filters.
Setting up and featuring was no problem, but when running install profile I got above error.
Patch in #9 fixes it for me.
Also had to patch i18nviews with https://drupal.org/comment/6467022#comment-6467022.
Comment #14
FR6 commentedAfter playing with my localization settings I had the same problem with Views 7.x-3.8 module:
After saving a view, I had the PHP error "Call to a member function init_display() on a non-object in modules/all/views/plugins/views_plugin_localization.inc".
To fix the problem like dawehner (#1) said:
- Views > Settings > Advanced (admin/structure/views/settings/advanced)
- In Localization > Translation method: Check the radio button "None"
- Save configuration
Comment #15
tom verhaeghe commentedI had the same problem. Patched with #9 and it now works like a charm. Changing the settings as mentioned in #14 did not fix it for me.
Comment #16
wroxbox commentedPatch #9 works for us too. Would like to change the status "RTBC"
Comment #19
bluesman2014 commented#9 works for me. I had been trying to save views, but each time I clicked Save I was getting the WSOD. Thanks q0rban!
#14 didn't make any difference unfortunately.
Comment #21
marcelovaniWhat is the current situation with this issue?
Comment #22
thtas commentedI've had good success with patch from #9
looks like the patch was postponed by the testbot. Can we re-queue it?
Comment #23
ptmkenny commentedRe-uploading the patch in #9 because according to an IRC discussion with timplunkett the legacy testbots no longer exist.
Comment #24
danepowell commented#23 works for us.
Comment #25
orkutmuratyilmaz#23 solved our problem too:)
Comment #26
Rockay commentedAwesome! #9 patch saved me big time.
Been at the same issue with views in D7.
Comment #27
mvcPatch #23 worked for me too.
Comment #29
colanThanks for the "git am"-able patch!
Comment #32
catchComment #41
quietone commentedAfter the nudge from larowlan I did some digging ....
This issue was committed to Views for Drupal 7 version 7.x-3.x-dev on 23 December 2015. It was then moved to Drupal core for back porting. However, Views was already merged into core, that happened on Oct 22, 2012 #1805996: [META] Views in Drupal Core. Furthermore, this particular issue is making changes to the localization plugin which was removed from Views (for Drupal 7) 8.x-3.x-dev on Sep 8 2012 in #1754322: Remove export and localization code before the merge. This patch is not relevant to Drupal 8+.
I think the changes in #29 should be revert, that is, this goes back to Views for Drupal 7 version 7.x-3.x-dev, with a status of 'Fixed';.
Comment #42
quietone commentedlarowlan has confirmed my finding so I am making the changes to the meta data.