drupal 8 view filtering criteria works on preview but not on block - view

Im creating a view in drupal 8 to show the most commented articles. Im using as filtering criteria: "published = yes", "Content type = article", "comment amount > 0".
I was hoping to get published articles that got at least 1 comment; all this showing inside a block in the right sidebar.
In the view preview everything works fine, showing the articles that got at least 1 comment and ignoring articles with 0 comments (when the view is created and later on).
The problem arises in the block because it only shows articles that got at least 1 comment at the time the view is created, after that it freezes and do not update the articles when new comments are added, even when the view's preview works just fine.
I've eliminated the "comment amount > 0" filtering criteria and the block updates the articles when new comments are added. But once a put it back the block freezes again.
Honestly I have no idea why, much more when the preview works perfectly fine. Any help will be appreciated.

Related

How to add infinite scrolling to classic view blogger

Question: I'm trying to get all my posts in one scroll. It was working until recently by increasing "Max posts shown on main page" in Posts under settings to over 100. However, it is now cutting off at around 25, despite updating the max posts. Ive tried adding the various html codes to the edit html, but nothing works. Is there a pushbutton way to do this? Or at least include an "older posts" at the bottom? Classic view seems very limited, and at present, it will not even display a link to access my oldests posts. Thanks in advance, Chris

JOOMLA Read Private Message in URL Bug

I am building a new website in Joomla 3 and here is some really weird behavior i just stumbled over…
I get a wrong URL in Menu Items and read more links, saying, e.g
website.de/weOffer/drinks/Read%20Private%20Message/beer.
I would give you a real URL, but the project is still under development and classified.
The /Read%20Private%20Message/ part in the URL obviously does not belong there and gets inserted by joomla by default. The result of course is fatal. Not only the menu items aren't working, the read more links aren't either, all leading to 404 errors !
To go into more detail, here is what i have set up and what i have found out so far.
I have made a category blog, where articles are listed, each with a read more link in it, which works as expected.
Now each full text article should have its own slideshow and a couple of other modules, like a facts box in it.
Thats why, the article itself must show up as a menu item as well, so in the module manager i can select, that a specific slideshow module is used in this specific article only.
Therefore i have created menu items with the type of single article that links to the defined Article.
The main menu represents the page tree, each category blog has links to single articles as children. Some cat blog have cat blogs as children and then articles.
This setup works as expected, as long as i don't set the article menu item as a child of the category blog of the category the article itself belongs to.
Example:
MENU =
we offer(catblog) -> drinks(catblog) -> beer(singlearticle)
ARTICLEMANAGER
beer(category: drinks)
RESULT: wrong URL as above.
I can fix the error, by using rebuild in the menu manager, but thats only half way done. The menu URL is getting fixed, but than i have to go into the article itself, remove the read more and insert it back again, because the read private message doesnt get removed, even when i clear my cache. When i am done re-saving the readmore link, everything works like normal, until i save the article menu item the next time. Read Private Message bug is back again, up for another round.
I am a SuperUser, so i suspect i have all rights possible in joomla...
This must have something to do with Search engine friendly URLS (SEF), since it only occurs when i have SEF and mod rewrite turned on. I am using the default .htaccess file without any changes.
Here are some people with a similar problem, but no satisfying solution is given:
http://forum.joomla.org/viewtopic.php?t=802045
http://www.jevents.net/forum/viewtopic.php?f=31&t=19620
I have read about migration and update errors, leading to the same problem.
I migrated manually (sql backup, change of some path in config file) from local apache to 1&1 apache server, both running PHP 5.4, so i doubt that this is a migration issue Plus the problem also appears when i create new articles and menu items (under the parent category).
Changing aliases in both menu items and article itself does not have any effect.
I really hope somebody could give me a hint, or maybe even just confirm that this is a bug If this is designed behavior than whats the reason for it ?.
I am quite frustrated about it and i don't have that many options left since:
1. SEF is a MUST (to my client)
2. Changing the menu tree structure, so that the linked items are no longer children of their cat block parent destroys my breadcrumbs.
3. rebuild and change every menu item and article manually 2 to 3 times is time consuming, error prone, annoying and i don#t want to sell a product to a client like this, since they want to maintain it for themselves as far as posiible.
Your help is really appreciated !
Greets paad.

Why is the 'time ago' not displayed in my view?

I'm not sure whether this is a bug or not, so I'm just going to ask this. I created a view (and block) with a 'Comment: Post date' field with 'Time ago (with "ago" appended)' as Date format. I didn't fill in a custom date format.
Everything is previewed perfectly, but when I go to my dashboard, I only see the "ago": the actual numbers (hours, minutes, seconds...) aren't displayed.
I cleared caches, but nothing happened. I'm still using the default Seven 7.23 administration theme for my dashboard and I didn't set a custom template file or anything else. I just created the view.
How can I solve this?
Edit: I exported my view, so you can read the code here.
Try clearing your cache in drupal. Admin > Configuration > Performance > Clear All Caches
(/admin/config/development/performance)
I noticed you said you added Comment: Post Date. If you did not mean to display the time of comments on the node then my guess is that would be your issue. If not comments exist, you have nothing to get the last time.
If you wanted to get the last time of the save for the node then you will need to switch to last updated to fix your issue.
Edit: It seems odd to me that everything is working in the views preview section but not on the actual page. This leads me to think it might have something to do with the user you are viewing it with. Are you logged in when you test it, or are you opening it in a different browser on a new session? Check the user permissions for your content field type and make sure "can view" is checked.
I don't know what causes the problem, but I solved it temporally. I changed the Date format to 'Time ago' an added the 'ago' manually via the 'Rewrite results' function.

Joomla article text truncating in category list

I am having an issue with Joomla whereas the text for articles being displayed in a category blog or category list is being cut off.
I would like to show articles on a page with all the text being shown and not truncated.
Here is a picture of the issue. As you can see the first article is being truncated whereas the second and third are fine as they are shorter than length.
I have tried amending the 'read-more' settings, changed the intro text size and several other options and just can't seem to sort this issue. I have also looked in the default templates for the content articles to change the size manualy but can't see where I can do this.
Is anybody able to help with this issue?
Thanks!
Click Content->Categories
Click Options (on Categories Page)
Click on the Blog/Featured Layouts
Change the "# Leading Articles" count from 1 to 10 or higher
Change the "# Intro Articles" count to 0

MVC3 how to optimize the get and post

Just an introduction of my code...
I have a view that consists of
-details of an item
-questionnaire
The questionnaire part has:
-series of questions
-answer choices (can be single choice or multi-choice)
so in my viewmodel, I have like a mainviewmodel to contain the details of a certain item and inside that mainviewmodel, i have a property that maps to a questionnaireviewmodel.
questionnaireviewmodel:
- questionid
- answertype (single or multi-choice)
- answer_score
- answer_text
mainviewmodel:
- detailid
- name
- status
- questions : list
so in the view, i created a loop to display each of the questions and when a user click saves, it saves the answers to a database.
the problem..
The problem I have now is that its taking aorund 11secs to load the page and around 18 seconds to do the saving. Note that the questions count i have in my page is around 8 only. I noticed that my page size is sized around 630kb+ maybe because of the many hidden fields i have in my page to keep the details of the questions.
Do you have any suggestions quick or long term(rearchitecture) on how I can improve performance? I'm thinking of doing ajax call so as not to post the whole page on this but would love to hear your feedbacks. Thanks.
It's not easy to give you specific suggestions on rearchitecture before analyzing the whole application and reviewing the whole source code. My recommendation is doing profiling. Justly click VisualStudio2010 menu 'Aanlyze'-'Launch performance wizard'. Start you application in release mode and record your actions. Finally the profiling report will tell you the hot lines that takes most time of 11s. Hope this helps.

Resources