[view:myview] is replaced with the content listing when editing a node
| Project: | Insert View |
| Version: | 5.x-1.0 |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
I use Insert View module to display content listings from views inside other content. I recently upgraded to 5.x-1.0 from 5.x-1.x-dev but not sure if the problem below is related to version upgrade.
I have a view named "case_studies" and I call this view in one of my nodes titled "Advertiser" using [view:case_studies=4]. The strange thing is that if I edit the "Advertiser" node in the admin section, the body textarea shows me the content listing from that view instead of [view:case_studies=4]. This is a problem because if I then save the "Advertiser" node, it saves the static HTML content rather than [view:case_studies=4]. This would mean that when the "Advertiser" page is viewed on the website, the content is not actually coming from the view.
The other views modules that are used are Views 5.x-1.6 and Views UI 5.x-1.6
This does not happen on the live website which is still using Insert View 5.x-1.x-dev (and Views 5.x-1.5 and Views UI 5.x-1.5). Whenever the "Advertiser" page is opened for editing in the admin, the body text shows [views:case_studies=4].
Looking into the code, we found that there are many code changes to insert_view.module file including that the insert_view_nodeapi() function is no more used.
Can you please suggest the solution so that [view:case_studies=4] is not parsed in the admin and is parsed only when viewing on the website? Please let me know in case I can provide further details.
Best regards,
Abhay

#1
I also am experiencing the same issue.
Very powerful module that I'd like to use to redo a lot of my intranet pages with.
#2
There have been changes in Insert View just prior to the 5.x-1.0 release to make it a pure input filter module, rather than a hybrid relying on hook_nodeapi(). In the README.txt there is an explanation, as well as info regarding installation and upgrade.
Do either of you have a WYSIWYG editor installed on the site? Or any other modules that may affect the processing of the textarea?
mlsamuelson
#3
After disabling the nodeteaser module, I was able to view the insert_view tag instead of the (I assume input filter cached) html output of the insert_view tag.
Any chance of using both at the same time?
Thanks for your help!
#4
Yes, there is a WYSIWYG editor for the textarea.
In fact, I am experiencing a similar issue but related to another area. Yesterday, I created a new node and put some PHP code into it. I set the input format to allow PHP for the node. Surprisingly, when I edited the node, I found that the PHP code is no more in the "body" field and what exists there is the output from the PHP code. What it seems is that the content in the "body" part is being parsed, if it is calling a view or putting some PHP code.
For example, I wrote the next statements in the "body" area:
<?phpecho "hello";
echo "<br> The PHP code";
?>
On editing, this is what I saw in the "body" area:
hello
The PHP code
Any ideas?