Notice: Undefined index: uid in views_handler_field->get_value()

1 contenuto / 0 new
Notice: Undefined index: uid in views_handler_field->get_value()

ciao sto finalmente lavorando con drupal in maniera quasi produttiva e senza mettere le zampine nel codice ma con views visto che ho trovato il modo di modificare il profilo utente grazie a :

http://drupal.stackexchange.com/questions/73184/how-to-change-the-user-p...

Option 2:

Create page view (Users)
Apply steps 2-6 as Option 1
Add Path user/%user under Page Settings
Save view.

+

I made the same as wanted amanda setting ad you say in #2 but on:

CONTEXTUAL FILTERS > User Uid > Provide default value - Type > User ID from URL

check active on: Skip default argument for view URL
then on: WHEN THE FILTER VALUE IS IN THE URL OR A DEFAULT IS PROVIDED

check active on: Specify validation criteria
Specify validation criteria: set to > User

Type of user filter value to allow: radio on : Allow both numeric UIDs and string usernames

Action to take if filter value does not validate:

set to: Display all results for the specific field

I don't know why the first time doesn't works then it will do right view the correct profile page as i set in the field view type format...

togliendo il link allo user profile dal nome nella scheda del profilo (ci sono già quindi a cosa mi serve il link, no? si è scatenato un errore vd titolo che ho risolto con #17 da qui https://drupal.org/node/1609088 ) cioè

@@ -16,9 +16,7 @@ class views_handler_field_user extends views_handler_field {
*/
function init(&$view, &$data) {
parent::init($view, $data);
- if (!empty($this->options['link_to_user'])) {
- $this->additional_fields['uid'] = 'uid';
- }
+ $this->additional_fields['uid'] = 'uid';
}

function option_definition() {
diff --git a/modules/user/views_handler_field_user_language.inc b/modules/user/views_handler_field_user_language.inc
index e29da31..c3bd854 100644
--- a/modules/user/views_handler_field_user_language.inc
+++ b/modules/user/views_handler_field_user_language.inc
@@ -31,9 +31,4 @@ class views_handler_field_user_language extends views_handler_field_user {

return $this->sanitize_value($lang->name);
}
-
- function render($values) {
- $value = $this->get_value($values);
- return $this->render_link($this->sanitize_value($value), $values);
- }
}
diff --git a/modules/user/views_handler_field_user_name.inc b/modules/user/views_handler_field_user_name.inc
index 4551451..2fc9d53 100644
--- a/modules/user/views_handler_field_user_name.inc
+++ b/modules/user/views_handler_field_user_name.inc
@@ -11,16 +11,6 @@
* @ingroup views_field_handlers
*/
class views_handler_field_user_name extends views_handler_field_user {
- /**
- * Add uid in the query so we can test for anonymous if needed.
- */
- function init(&$view, &$data) {
- parent::init($view, $data);
- if (!empty($this->options['overwrite_anonymous']) || !empty($this->options['format_username'])) {
- $this->additional_fields['uid'] = 'uid';
- }
- }
-
function option_definition() {
$options = parent::option_definition();

ps i files e cartelle indicati io li ho trovati sotto /sites/all/modules/contrib/views/modules/user

pps serve a me come memo e spero anche a voi a fare qualcosa in + se non sapete scrivere moduli o codice, altrimenti a che cavolo mi serve un CMS? ;)

Drupal Version: