Drupal View Filter Invalid Option - drupal-7

I have a view that allows the user to filter by an exposed month dropdown list.
When viewing the page in English, everything looks correct:
When viewing the page in French, the May option is incorrect:
Where is this list defined so that I can fix it?

Related

Is there a way to add other columns to the list display in the page admin?

Currently, in the wagtail admin for a page, it lists the Order, Title, Updated, Page Type, and Status. I would like to add an extra column for a property from my custom page model.
I would have thought that if there isn't a built-in method, I could at least overextend a template, or simply append something to the page title?
My situation is that I have created a blog page that has a date field. It is only that I wish to show.
My google-fu has failed me entirely on finding an answer as I'm sure this must have been discussed before.
There isn't currently an 'official' way for customising the columns in the listing. However, for displaying the date alongside the page title, you could make use of the get_admin_display_title method added in Wagtail 1.8: http://docs.wagtail.io/en/latest/reference/pages/model_reference.html#wagtail.wagtailcore.models.Page.get_admin_display_title

Same View, different displays, One page, same exposed filters. Possible?

I want to list my content categorically within view. The problem is that I want all of it to be filtered through exposed filters.
Here is what Content Type looks like:-
Content Type (MyContent)
Title
Body
Category (it has three categories in it "Category1, Category2 and Category 3". User has to selects one when entering the content)
Now I created a view which lists all of the content linearly (like a normal list) and I have exposed filters on top, which filter the content, but now I am not sure how to proceed when I have to show the content as:-
Any Idea what I should do to achieve this? What should I do in this scenario?
I'll be grateful to you valuable assistance.
Best.
You can group your results together. Under the Format option in views next to your format type (unformatted list, etc...) click on Settings.
In this menu you'll see "Grouping field" this will allow you to specify on which fields your results should be grouped. The field needs to already be included in your display.
Once you enable this you'll probably notice that that field is now displayed twice. You can just go into that field and check "Exclude from Display"

Passing Arguments from a paginated Drupal Views Page url

I have a page generated by Views which lists 5 Articles at a time. This view is paginated so that page 2 of this View will list the second batch of 5 Articles, page 3 will list the third batch of Articles, so on and so forth.
My question: is it somehow possible to extract fields from Articles listed on the page you're currently on, perhaps via the url? And I only want to them on the Articles being displayed by the page the viewer is currently on and not all the Articles.
My intent is to have a Views Block that would ...
determine what page of the paginated View above you're looking at
determine what Articles are listed on that specific page
aggregate and display the Taxonomy Terms of those listed Articles (Articles have a Taxonomy Term field) in the block
do all the above automatically as you change what page you're looking at
The way I'm going about this is to list all the the Taxonomy terms in a block which is relatively straightforward. What I can't figure out is how to filter it based on what Articles are being displayed to me in a paginated page.
I was thinking maybe this is possible to use it using the url of the paginated page which goes along this format: ?page=1, ?page=2, etc.
If anyone could just point me to the right direction, I would appreciate it. I'm also open to alternatives.
What if you created another display of the same view as your Article page view?
You could add a Relationship for the Taxonomy Terms and then the Fields in the block view would be the appropriate fields from the taxonomy terms. You'll want to setup the same Filters, Sort and Pager options for the two displays are the same. That way the results should match.
Then you might just want to hide the pager from the block view. You could do that through a custom template for that view display, or maybe a preprocess function that hides the pager for just your view, or maybe via CSS.

Drupal view with contextual filters returning blank screen

This is a very particular question so any input will be appreciated...
I'm using panels and views in a custom view template file in a drupal 7 site. The panel has a view embedded in it, as well as some extra content beneath. I have the view set with 3 contextual filters having taxonomy term pulled from url. This is working fine.
So if I go to something like
/search/ford/red
It will successfully pull all items having taxonomy term "ford" that also have taxonomy term "red" applied.
But interestingly enough, if I change one of the terms to something that exists in the vocabulary, but does not happen to have any relation to items that successfully pass the first criteria, it will just load the site wrapper with the panel blank. No errors of any kind, search filter box disappears, pagination disappears, even the other content embedded in the view disappears.
It doesn't seem to matter what I choose for "Action to take if filter value does not validate" for any or all of the filters applied to the view. I tried to set it to show no results, but I assumed it didn't apply since I am also using a custom template file for the view.
I expect it to show no results. But I also expect it to have the search bar up top so the user can select a different filter from the menu, as well as the other content embedded in the view.
The search box is custom to the view template file. The only reason it would not show is if the view itself does not load. In this case it looks like the whole panel is not showing.
Feel free to ask for specifics if this is not enough to go on. Thanks.
for future readers experiencing the many unexplained holes in drupal, here is the complete hack I had to do to prevent this unannounced error:
In my custom view I had to check the size of $view->result and then redefine it if empty:
<?php if(sizeof($view->result) < 1): $view->result = array(0 => array()); ?>
<div class="no-results">
There are no results.
</div>
<?php else: ?>
--- normal view loop here ---
<?php endif; ?>
No, simply adding a count provision to the result loop was not working. I don't know how drupal processes the views, but if I allowed the result array to be empty it would not display the contents of this panel.
Down side - It still doesn't display any of the other content embedded in this panel, so if I had another embedded view beneath this one it would mysteriously vanish.
Oh well, I'll just tell the admins they can't populate this page with anything but a filterable index. Phooey, but that's drupal life... POS.

Visualforce Custom lookup visualforce page

I was wondering if there is a way to override the native functionality of the lookup field in Salesforce and replace it with a visualforce page. The reason I'm trying to override this button is because when the user does a look up, the look up returns everybody with that name. What we want to return is a list of all the contacts by account for the contact being searched.
Here's what I'm trying to achieve:
When the user clicks the lookup button my visualforce page will launch and allow the user to see the account and all the contacts of that account.
Is this even possible? What other ways would you suggest going about this?
Here's a screen shot of what I'm trying to change:
Thanks for all your help!
It sounds really like you just need to customise the columns on the lookup to make it better suited to your needs. If you go to Setup -> Customize -> Contacts -> Search Layouts, you'll see entries for Lookup Dialogs and Lookup Phone Dialogs, there you can edit the columns displayed in the lookup windows.
If you really need a custom solution:
You can't override the lookup page itself, but you could create a new visualforce page for your account, using <apex:detail> and other similar tags to make your life simpler. Then you could include a search section underneath, where a user can enter various search terms which you put into a dynamic SOQL query and then render the results for them to choose from.
yeah its possible by javascript as i did by visual force page that will show the records of related lists and upon selection id of that record passed to parent window by jscipt. and performed same functionality ..
As far as I know - NO.
As a workaround you can use JavaScript.
What we did in our situation? We implement everything in JavaScript. We created an inputText and right on the right of this inputText we placed image with this lookup icon. On image click we create ExtJS popup window (I think you can simply create VF page and show this page in popup window). After window was closed you fill in the inputText field.
There's no out-of-the-box override for this button, last I checked, so something custom would be required. If you're set on having a popup and do not want an inline solution, I'd recommend reviewing this tutorial to get familiar with some of the issues with popups in Visualforce.
But considering what you are looking to accomplish, you could also have your account and filtered list of all contacts associated with that account appear inline on your page when the user clicks a new, custom search button. Of course that page would itself be in Visualforce (or inline Visualforce in a standard page layout) - which you may or may not want to have to code and maintain.
The AJAX Toolkit might also be a good place to start if you want to go with a custom JavaScript button placed on a standard page layout.

Resources