Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dawehner’s picture

You might have to switch the localization backend to none/core again, which can be done under the advanced settings of views.

dawehner’s picture

Status: Active » Postponed (maintainer needs more info)

Update status, whether you updated the value.

SocialNicheGuru’s picture

Status: Postponed (maintainer needs more info) » Active

it is set to none

marcelovani’s picture

Component: Views Data » Translations
Status: Active » Needs review
FileSize
2.35 KB

I 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.

kolyapatrik’s picture

Thanks marcelovani. It work with this patch

dawehner’s picture

Thank you for working on this particular problem!

+++ b/plugins/views_plugin_localization.incundefined
@@ -136,30 +136,33 @@ class views_plugin_localization extends views_plugin {
+    if (!empty($this->view) && !empty($this->view->localization_plugin) && method_exists($this->view, 'is_translatable')) {

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.

marcelovani’s picture

FileSize
574 bytes

@dawehner sure thing, here is the patch.

q0rban’s picture

Status: Needs review » Needs work

I 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.

q0rban’s picture

Component: Translations » Code
Priority: Normal » Major
Status: Needs work » Needs review
FileSize
2.07 KB

Bumping 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:

  1. The views_plugin_localization_none plugin was not being inited (and therefore $this->view was not set).
  2. The init_localization() function returned TRUE for all localization plugins (once they had been set on the view), regardless if the translate attribute was set to FALSE on the plugin.
mex30’s picture

Hi,
How should I use this patch?
I'm not very good to use Drupal.

mex30’s picture

betarobot’s picture

Hare is a brief tutorial on applying patches: https://drupal.org/patch/apply

HnLn’s picture

Same 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.

FR6’s picture

After 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

Tom Verhaeghe’s picture

I 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.

wroxbox’s picture

Status: Needs review » Reviewed & tested by the community

Patch #9 works for us too. Would like to change the status "RTBC"

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 9: views-1685144-localization-bug.patch, failed testing.

bluesman2014’s picture

#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.

Status: Needs work » Needs review
marcelovani’s picture

What is the current situation with this issue?

thtas’s picture

I've had good success with patch from #9

looks like the patch was postponed by the testbot. Can we re-queue it?

ptmkenny’s picture

Re-uploading the patch in #9 because according to an IRC discussion with timplunkett the legacy testbots no longer exist.

Dane Powell’s picture

Status: Needs review » Reviewed & tested by the community

#23 works for us.

Orkut Murat Yılmaz’s picture

#23 solved our problem too:)

Rockay’s picture

Awesome! #9 patch saved me big time.
Been at the same issue with views in D7.

mvc’s picture

Patch #23 worked for me too.

  • colan committed feaeb7c on 7.x-3.x authored by q0rban
    Issue #1685144 by marcelovani, dawehner, q0rban: Refactor...
colan’s picture

Project: Views (for Drupal 7) » Drupal core
Version: 7.x-3.x-dev » 8.0.x-dev
Component: Code » views.module
Status: Reviewed & tested by the community » Patch (to be ported)

Thanks for the "git am"-able patch!

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

catch’s picture

Status: Patch (to be ported) » Needs work

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.2.x-dev

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.2.x-dev » 9.3.x-dev
quietone’s picture

Issue tags: +Bug Smash Initiative

After 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';.

quietone’s picture

Project: Drupal core » Views (for Drupal 7)
Version: 9.3.x-dev » 7.x-3.13
Component: views.module » Code
Status: Needs work » Fixed

larowlan has confirmed my finding so I am making the changes to the meta data.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.