How to get the content of a specific document version

I am trying to retrieve the content of a specific version with Sharepoint API. I can get metadata like this :

{ "d": {     "results": [         {             "__metadata": {                 "id": "https://sharepointtest/_api/SP.FileVersionIDVERSION",                 "uri": "https://sharepointtest/_api/SP.FileVersionIDVERSION",                 "type": "SP.FileVersion"             },             "CreatedBy": {                 "__deferred": {                     "uri": "https://sharepointtest/_api/SP.FileVersionIDVERSION/CreatedBy"                 }             },             "CheckInComment": "",             "Created": "2019-05-14T07:45:15Z",             "ID": 512,             "IsCurrentVersion": false,             "Length": "4560528",             "Size": 4560528,             "Url": "_vti_history/512/Shared documents/sampleversion.odt",             "VersionLabel": "1.0"         }     ] } 

Using this, does anyone know how to get it as an InputStream with Java? My function in Java is

public ContentReturn getContent() {     InputStream content = null;     HttpGet httpGet = new HttpGet();     try {         httpGet =  new HttpGet("I DON'T KNOW WHAT I SHOULD PUT HERE THIS IS THE QUESTION :)" );                  content = client.execute(httpGet).getEntity().getContent();         content.close();     } catch (Exception e) {         e.printStackTrace();     }     return new ContentReturn(content, httpGet); } 


Thanks by advance!!

I would like to use the Content Search Web Part to only display Document Libraries

So I been using advanced query builder to accomplish to only display document libraries because I have a workflow that generates numerous packages.

path:”Site URL” (contentclass:STS_List_DocumentLibrary)

This only displays a couple of libraries, but also includes the general document libraries, how can I narrow my query to search only “FY” in the title of the document libraries thanks.

My Website – Move Menu or Content

I’ve been making my menu a bit wider on my website, then I realized that the menu was too wide that it started touching the content portion of the wrapper and not reformatting itself so they do not touch. I’m going to include the css code I use for the website itself and the menu. I tried changing those values around for position, and nothing is making either the menu or the content move off to the side a bit more. This is from the menu code directly.

<style> #menu {     font-family:Verdana, Geneva, sans-serif ;     font-size:16px;     width: 210px;     }  #menu li a {     height: 32px;     voice-family: \"\\"}\\"\";      voice-family: inherit;     height: 24px;     text-decoration: none; }     #menu li a:link, #menu li a:visited {     color: #FFF;     display: block;     background:  url(images/menu.gif);     padding: 8px 0 0 10px; }  #menu li a:hover {     color: #FFF;     background:  url(images/menu.gif) 0 -32px;     padding: 8px 0 0 10px; }  #menu li {     /* background-color:black; */     background-color:white;     margin: 0;     padding: 0; }  #menu ul {     list-style: none;     margin: 0;     padding: 0; } </style> </head> <body> <div id=\"menu\">   <ul>     <li><img src='images/top.gif' height='32px' width='210px'></li>     <li><a href=\"/\" title=\"Home\">HOME</a></li>     <li><a href=\"index.php?id=item1\" title=\"item1">item1</a></li>     <li><a href=\"index.php?id=item2\" title=\"item2\">item2</a></li>     <li><a href=\"index.php?id=HISTORY\" title=\"History\">HISTORY</a></li>     <li><a href=\"index.php?id=FAQs\" title=\"Frequently Asked Questions\">FAQs</a></li>     <li><a href=\"index.php?id=FEEDBACK\" title=\"Feedback\">FEEDBACK</a></li>     <li><a href=\"index.php?id=SOFTWARE\" title=\"Software Downloads\">SOFTWARE</a></li>     <!-- <li><img src='images/animate.gif' height='200px'></li> -->     <li><a href=\"index.php?id=ADMIN\" title=\"Administrator\">ADMINISTRATOR</a></li>     <li><img src='images/apple.png' height='200px'></li>     </ul> </div><!-- menu --> 

The following code is from the css stylesheet used for the site itself for the content.

body {     font-family: Georgia, "Times New Roman",           Times, serif;     color: purple;     background-color: white}  h1 {     font-family: Helvetica, Geneva, Arial,SunSans-Regular, sans-serif;     color: purple;}  .wrapper{     width: 810px;     margin: auto;     border: solid gray 0px;     }  .banner {/* color: yellow; background-color:white; border-style:solid; border-width:10px; */ width:810px; position:relative; top:10px; left:10px; }  .menu {color: orange; /* background-color:white; border-style:solid; border-width:10px; */ width:185px; height:400px; position:relative; left:10px; top:20px; padding:2px; }  .content {text-align: center; color: black; font-family: "Verdana", sans-serif; /* background-color:white; border-color: red; border-style:solid; border-width:10px; */ width:570px; height:395px; position:relative; left:230px; top:-400px; padding:5px; }  .footer {text-align: center; color: gray; font-family: "Verdana", sans-serif; /* background-color:white; border-color: gray; border-style:solid; border-width:10px; */ width:790px; height:60px; position:relative; left:10px; top:-20px; padding:5px; }  .table{width:200px; height:50px; text-align:center; font-family:"Verdana", sans-serif; border-style: solid; border: 1px; border-color: black; background-color: yellow; } 

I tried changing values around, and nothing made any of the content budge anywhere whatsoever.

I’m posting to get another set of eyes to suggest something. This code is from index so that it can be seen.

<?php  echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\"> <html>  <head> <title>My first styled page</title>  <meta name=\"google-site-verification\" content=\"4vAeVCS0VnLsAbSSvB6mFu0SIZOqBqy1M3Ns0GCD9ys\"/>    <link rel=\"stylesheet\" href=\"css/style.css\" type=\"text/css\"/>   <link rel=\"shortcut icon\" href=\"images/favicon.ico\"/>   <link rel=\"apple-touch-icon\" href=\"images/favicon.ico\"/>  </head>";   echo "<body> <div class=\"wrapper\"> <div class=\"banner\">"; include 'banner.php'; echo "</div> <div class=\"menu\">"; include 'menu.php'; echo "</div> <div class=\"content\">"; include 'content.php'; echo "</div> </div><!--wrapper-->  <center> <div class=\"footer\">"; include 'footer.php'; echo "</div> </center>  </body> </html>";  ?> 

How to echo same content as in file?

I have a file content like below

cat file  Hello How are you ? I am good Watsapppp bla bla  

But When I am exporting and echoing its value/content , This gives everything in same line and bit different.

export filename=$  (cat file)  echo $  filename Hello How are you 0 1 2 3 a m p q I am good Watsapppp 

My Requirement in script is to print same content as in file.

Should be

echo $  filename Hello How are you ? I am good Watsapppp bla bla 

Overwrite block layout inside text_list (content) blocks

I re-developed the whole category page in a layout.xml file included in my custom module, trying to reuse the block names. I needed to change many block (type) classes.

I had read that by redefining the block it overwrote but it is not so. Now the category page works correctly but the block category.products” is printed 3 times.

<catalog_category_default>     <reference name="content">         <block type="ristothemefrontend_handler/catalog_category_view" name="category.categories" template="catalog/category/category-categories.phtml" />         <block type="ristothemefrontend_handler/catalog_category_view" name="category.products" template="catalog/category/view.phtml">             <block type="ristothemefrontend_handler/catalog_product_list" name="product_list" template="catalog/product/list.phtml">                 <action method="setToolbarBlockName"><name>product_list_toolbar</name></action>                 <block type="ristothemefrontend_handler/catalog_product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">                     <block type="page/html_pager" name="product_list_toolbar_pager" />                     <block type="ristothemefrontend_handler/catalog_product_list_toolbar" name="catalog.left" template="catalog/category/left.phtml">                         <block type="ristothemefrontend_handler/catalog_category_view" name="catalog.left.categories" as="categories" template="catalog/category/categories.phtml" />                         <block type="risto_programmablebanners/list" name="catalog.left.banners" as="banners">                             <action method="setBlockType"><type>category</type></action>                         </block>                     </block>                     <block type="ristothemefrontend_handler/catalog_layer_view" name="catalog.left.layer" template="catalog/layer/view.phtml">                         <action method="unsetChild"><alias>category_filter</alias></action>                     </block>                     <block type="ristothemefrontend_handler/catalog_product_list_toolbar" name="category.toolbar" template="catalog/category/toolbar.phtml" />                 </block>                 <block type="ristothemefrontend_handler/catalog_category_view" name="category.products.long_description" template="catalog/category/long_description.phtml"/>             </block>         </block>     </reference> </catalog_category_default> 

The blocks in the previous layouts (base / default etc.) are not overwritten, but loaded.

Cannot add content anymore

As the title says, i cannot add content from the FileBrowser (a dir_listing) module anymore. My error.log gives me the following message:

[php7:notice] [pid 5640:tid 1816] [client] Uncaught PHP Exception Drupal\Core\Entity\EntityStorageException: “The “” plugin does not exist. Valid plugin IDs for Drupal\activity_creator\Plugin\ActivityContextManager are: community_activity_context, content_in_my_group_activity_context, group_activity_context, group_content_in_my_group_activity_context, organizer_activity_context, owner_activity_context, profile_activity_context, follow_content_activity_context, vote_activity_context, mention_activity_context, private_message_activity_context” at D:\xampp\htdocs\core\lib\Drupal\Core\Entity\Sql\SqlContentEntityStorage.php line 847, referer:

What do i have to change in order to make it work again?

External Content Type Connection : illegal operation attempted on a registry key marked for deletion

when I add a connection to a sql server database in an external content type from Sharepoint Designer 2013 I get this error:

Retrieving the COM class factory for component with CLSID {BDEADDF26....} failed due to the following error: 800703fa illegal operation attempted on a registry key that has been marked for deletion 

I see that CLSID corresponds to

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\ISAPI\OWSSVR.DLL

What’s wrong?

How to show featured image instead of post content?

Hello guys,

Maybe you can help me with a little thing…

I have a code to show a video, and when I don't have a video, the post content is shown instead. I need to replace the post content (text) with the post featured image: the_post_thumbnail('full');

This is my code:

 <div id="play_video">  <?php $  content=get_post_meta($  videoId,"wpscript_embed",true); if($  content){                  $  width = '100%'; $  content = preg_replace('/width="(.*?)"/i', 'width="' . $  width .'"', $  content);...

How to show featured image instead of post content?