When I try to use the "translate" button for a view, I get the following error message:
PHP Fatal error: Call to undefined function i18n_string_translate_page() in /blah/blah/drupal-7.7/sites/all/modules/i18nviews/i18nviews.pages.inc on line 29
I am using the following (other) modules:
Package Name Type Status Version Chaos tool suite Chaos tools (ctools) Module Enabled 7.x-1.0-beta1 Core Block (block) Module Enabled 7.7 Core Contact (contact) Module Enabled 7.7 Core Content translation (translation) Module Enabled 7.7 Core Field (field) Module Enabled 7.7 Core Field SQL storage (field_sql_storage) Module Enabled 7.7 Core Field UI (field_ui) Module Enabled 7.7 Core File (file) Module Enabled 7.7 Core Filter (filter) Module Enabled 7.7 Core Image (image) Module Enabled 7.7 Core Locale (locale) Module Enabled 7.7 Core Menu (menu) Module Enabled 7.7 Core Node (node) Module Enabled 7.7 Core Options (options) Module Enabled 7.7 Core Overlay (overlay) Module Enabled 7.7 Core Path (path) Module Enabled 7.7 Core Shortcut (shortcut) Module Enabled 7.7 Core System (system) Module Enabled 7.7 Core Taxonomy (taxonomy) Module Enabled 7.7 Core Text (text) Module Enabled 7.7 Core Toolbar (toolbar) Module Enabled 7.7 Core Update manager (update) Module Enabled 7.7 Core User (user) Module Enabled 7.7 Date/Time Date (date) Module Enabled 7.x-2.0-alpha3 Date/Time Date API (date_api) Module Enabled 7.x-2.0-alpha3 Date/Time Date Popup (date_popup) Module Enabled 7.x-2.0-alpha3 Features Features (features) Module Enabled 7.x-1.0-beta3 Features Portfolio (portfolio) Module Enabled Fields Link (link) Module Enabled 7.x-1.0-alpha3 Multilingual Language icons (languageicons) Module Enabled 7.x-1.0-beta1 Multilingual Localization update (l10n_update) Module Enabled 7.x-1.0-beta2 Multilingual - Internationalization Block languages (i18n_block) Module Enabled 7.x-1.0-rc2 Multilingual - Internationalization Contact translation (i18n_contact) Module Enabled 7.x-1.0-rc2 Multilingual - Internationalization Field translation (i18n_field) Module Enabled 7.x-1.0-rc2 Multilingual - Internationalization Internationalization (i18n) Module Enabled 7.x-1.0-rc2 Multilingual - Internationalization Menu translation (i18n_menu) Module Enabled 7.x-1.0-rc2 Multilingual - Internationalization Multilingual content (i18n_node) Module Enabled 7.x-1.0-rc2 Multilingual - Internationalization Path translation (i18n_path) Module Enabled 7.x-1.0-rc2 Multilingual - Internationalization String translation (i18n_string) Module Enabled 7.x-1.0-rc2 Multilingual - Internationalization Taxonomy translation (i18n_taxonomy) Module Enabled 7.x-1.0-rc2 Multilingual - Internationalization Translation sets (i18n_translation) Module Enabled 7.x-1.0-rc2 Multilingual - Internationalization Variable translation (i18n_variable) Module Enabled 7.x-1.0-rc2 Multilingual - Internationalization Views translation (i18nviews) Module Enabled 7.x-3.x-dev Other Variable (variable) Module Enabled 7.x-1.0 Other Variable realm (variable_realm) Module Enabled 7.x-1.0 Other Variable store (variable_store) Module Enabled 7.x-1.0 Skinr Skinr (skinr) Module Enabled 7.x-2.x-dev User interface Gallery Formatter (galleryformatter) Module Enabled 7.x-1.0 Views Views (views) Module Enabled 7.x-3.0-rc1 Views Views exporter (views_export) Module Not installed 7.x-3.0-beta3 Views Views Slideshow (views_slideshow) Module Not installed 7.x-3.0-alpha1 Views Views Slideshow: Cycle (views_slideshow_cycle) Module Not installed 7.x-3.0-alpha1 Views Views UI (views_ui) Module Enabled 7.x-3.0-rc1 Core Bartik (bartik) Theme Enabled 7.7 Core Seven (seven) Theme Enabled 7.7
Comments
Comment #1
kytom commentedHaving the exact same problem.
Happened when I updated i18n to 7.x-1.0-rc2, where the function i18n_string_translate_page() got removed.
I tried copying the function from i18n_string.pages.inc from 7.x-1.0-beta8, but it just led to another error:
which is
check_plain($item_title->get_string()),in
i18n_string_translate_page_overview.Comment #2
spamator12 commentedSame here - Fatal error: Call to undefined function i18n_string_translate_page() in drupal\sites\all\modules\i18nviews\i18nviews.pages.inc on line 29
Comment #3
kerios83 commentedsame think here. I guess that Internationalization Views is not compatible with Internationalization module :) I hope it will get fixed soon cause views translation is very important for drupal community.
By the way Internationalization Views work fine with Internationalization beta 7...
there are also more bugs - http://drupal.org/node/1211892 (not related but easy to fix I think:)
Comment #4
miro_dietikerSomeone please provide a patch for this. i'm a little short in time currently.. but i'll apply it to fix it.
Comment #5
miro_dietikerGrr... dup.
Comment #6
gábor hojtsyDid some digging. Looks like the old i18n_string_translate_page() went away about a week ago, and similar functionality is now accessible via i18n_string_translate_page_object() in i18n_strings.pages.inc. The changeset was http://drupalcode.org/project/i18n.git/commitdiff/d237936b202b81b2bc78b7...
Comment #7
jhodgdonI need to get this working today, so I'm working on a patch... thanks for detective work Gabor - that should help...
Comment #8
jhodgdonOh gracious. It looks like the i18n module has adopted some kind of an object API, and i18n Views hasn't caught up.
Comment #9
jhodgdonI did manage to fix this. Will upload a patch in the next day or so when I get the time ... ping me if you need it sooner rather than later....
Comment #10
miro_dietikerWould be great. Expect that i can work on this topic next wednesday.
Comment #11
jhodgdonActually, I didn't manage to make what I would think of as a viable patch. I had to hack i18n_strings and some other things in Views in order to get my views internationalized, and I think the way I did it may not have been compatible with the previous storage for the Views strings. And even with those hacks, I found that i18n_strings would not allow me to localize any field rewrites (in the UI you can rewrite the output of fields), due to this issue:
#1238642: Strings should be able to be runned through filter_xss(_admin)
So I ended up turning off some error checking in i18n_strings completely (hacking, that is).
Anyway, I was under a very tight "we need to launch this site and it needs to be translated" deadline this past week, so I just had to go with expedient rather than correct...
So...all of that said, I imagine that the work I did wouldn't be totally irrelevant for the maintainers of this module, though I wouldn't recommend anyone else use it, so I'm attaching the actual module I ended up with.
Comment #12
kerios83 commented@jhodgdon thx for your effort ! I hope it will help miro fix this awesome module.
Comment #13
r13ose commentedI tried the new folder that you uploaded and now all my translations are gone for that View, so I had to go back in and change these. The only thing is that now when I try to save these nothing is saving.
Might be just me as I am also getting these errors which appear before I uploaded the new module: Notice: Array to string conversion in drupal_validate_utf8() (line 1359 of /includes/bootstrap.inc).
Warning: preg_match() expects parameter 2 to be string, array given in drupal_validate_utf8() (line 1372 of /includes/bootstrap.inc).
Hope that we can fix this as this is a great module.
Comment #14
jhodgdonDO NOT USE what I uploaded!! As I tried to state above, the database storage for translation strings is not backwards compatible with previous versions, and might not be compatible with whatever the maintainers tried to do.
Comment #15
webflo commentedNot sure about this. Lets discuss. Is it the right approach?
Comment #16
webflo commentedComment #17
r13ose commentedWhen I applied the first and second patch which I feel are exactly the same. I am getting this error now when I edit Translation Views:
Fatal error: Call to a member function get_string() on a non-object in /sites/all/modules/i18n/i18n_string/i18n_string.pages.inc on line 43
Line 43: check_plain($item_title->get_string()), from my module unless I need to upgrade the i18n module again.
I am also getting this error when I clear the cache: Fatal error: Only variables can be passed by reference in /home/friend72/public_html/sites/all/modules/i18n/i18n.pages.inc on line 31
Line 31: $placeholder = key($info['placeholders']);
Comment #18
miro_dietikerLooks almost great. However still not committed.
Note that still after creation of all views a full views string refresh is needed to make the translations persist on edit.
admin/config/regional/translate/i18n_string
The function process_locale_strings() triggered on each views save (currently triggering save_string) seems not to produce the source objects cleanly. Instead it nicely exports without any warning and - translation saves result in silent drop... Fail!
Comment #19
webflo commentedThx miro for your review. I think i found the bug with existing translation (the textgroup is views not view). Refactored a little bit and added translation links to "admin/structure/views".
Please review again.
Comment #20
miro_dietikerI have committed it.
It worked cleanly when testing.
Comment #21
r13ose commentedI looked at the commit that you did but I don't see i18nviews.inc and that is missing or is that not suppose to be added in?
Comment #22
miro_dietikerohhh... missed a git add... recommitted. Thanks!
Comment #24
webmestre commentedIs the new version of the module now patched in order not to give a white page at install ? (novembre 30th 2011)
Comment #25
kerios83 commentedI have checked the latest version and still get the white page... but after clear the cache the problem is gone. Give it a try.
Comment #26
webmestre commentedTo kerios83 : when installing the module, for me the "confirm" process fails just after clicking the submit button. How to clear the cache when the whole website is white, no admin, no navigation... ?
Comment #27
kerios83 commented@webmestre well it worked for me... If you have an error before any of those steps - copy the module, turn it on, run update.php, clear cache then I don't know what can help you. I have checked it again on clean drupal install, worked like a charm. I have noticed errors only when trying to upgrade previous versions when you have more then 1 language available and some translated content (views).
Maybe one of the maintainer can say more about it.
Comment #28
webmestre commented@kerios83 : thanks for helping !
"views translation" installed when :
1- 4 active languages : OK
2- no translated content : OK
1+2 - OK
Bug and crash seam to occur when translations have been done. Not sure...
It should mean, the module is not to install on working websites, but on a new website. ???
Comment #29
webflo commentedThis issue is fixed. Please open a new one with category "support request" or provide more information in #1356654: Module impossible to install
Comment #29.0
webflo commentedchanging input format to let me use the pre tag.