How to trigger a tx_news search using typolink - typo3

We recently switched from tt_news to Georg Ringers News extension and I - as a novice typo3 coder - need help fixing some typoscript code that was used to trigger context specific searches using typolink.
The old snippet was
typolink.parameter = 649
typolink.useCacheHash = 1
typolink.additionalParams.current = 1
typolink.additionalParams.wrap = &tx_ttnews[swords]=|
The new parameter needs to be &tx_news_pi1 but swords does not work. I can't find documentation or examples how the search value can be set. I searched the code itself and dumb tried my luck with &tx_news_pi1[search]=| but that just shows the default numerical typo3 error "Oops, an error occurred! Code: 2018020814150924e87636" if something cannot be rendered. BTW: The referenced search result page works fine if called using the search form.

After grabbing through the code try &tx_news_pi1[overwriteDemand][search][subject]=|.
On the target list you need to allow overwriting of the demand in the plugin flexform!

The solution of Thomas works for me even without the [overwriteDemand] using the search result page as target. Thx.
typolink.parameter = 649
typolink.useCacheHash = 1
typolink.additionalParams.current = 1
typolink.additionalParams.wrap = &tx_news_pi1[search][subject]=|
I really would like to know how this could be grabbed from the code. :-) It seems that I have to learn more about php and the underlying data structure - [search][subject] looks like a kind of array which I didn't expect for that type of parameter.

Related

There is a way to use lsp4e for calling language server methods directly?

I'm new to the lsp4e & lsp technologies and as far as I have seen the framework provides almost everything for working with eclipse. However there is a way to use this features at will? i.e I would like to use the LS to get all the functions on a file, I think this will be done with textDocument/documentSymbol but how can I get this using the lsp4e framework?
NOTE:
I checked for SymbolKind and seems it was not the one I was looking for however that input helped me finding a sample of DocumentSymbol
DocumentSymbolParams params = new DocumentSymbolParams(
new TextDocumentIdentifier(documentUri.toString()));
CompletableFuture<List<Either<SymbolInformation, DocumentSymbol>>> symbols =
languageServer.getTextDocumentService().documentSymbol(params);
I checked for SymbolKind and seems it was not the one I was looking for. However that input helped me finding a sample of DocumentSymbol
DocumentSymbolParams params = new DocumentSymbolParams(
new TextDocumentIdentifier(documentUri.toString()));
CompletableFuture<List<Either<SymbolInformation, DocumentSymbol>>> symbols =
languageServer.getTextDocumentService().documentSymbol(params);

Can not find get_Item() method for ListTemplates

I'm working on a C#/VSTO application for automate some tasks in MS Word. I'm trying to change the start number of a numbered list using a ListTemplate. I've seen several examples of accessing a ListTemplate like this:
ListTemplate template =
app.ListGalleries[WdListGalleryType.wdNumberGallery].ListTemplates.get_Item(ref n);
However, Visual Studio doesn't recognize get_Item() as a method for ListTemplates. Other methods of ListTemplates are listed in the VS popup so I'm not sure what the issue is? How do I go about referencing a ListTemplate? Thanks!
When I check in VSTO there is no get_Item for ListTemplates. Instead, one uses the index. For example
ListTemplate template =app.ListGalleries[Word.WdListGalleryType.wdNumberGallery].ListTemplates[Word.WdListGalleryType.wdNumberGallery];

TYPO3 WEC_Map Extension <script> Tag not inserted in HTML

I’m using Typo3 (Version 6.2.14) and upgraded WEC_Map to version 3.1.3 because I saw a warning on my map which says that I need to use an API key for Google Maps.
So I’ve generated an API key for "Maps Static API" and inserted it in WEC Map Admin. (I’ve used the same key for Browser API Key and Server API Key. Only difference is that I’ve added the secret for the Browser API Key separated by a comma.)
If I’ve visit my FE User Map in the backend the map is showing.
In the frontend instead I get the following error: "
There doesn't seem to be anything to display. Make sure the map is configured correctly and there are users or markers set".
Inspecting the source code I saw that the script tag to maps.googleapis.com is not generated. It looks like this is causing the issue, but I don't know why it is happening.
I hope that someone using a similar setup can point me into the right direction.
Thank you guys. (It would be nice if someone could add the Tag for WEC_Map)
Ok I resolved this. The problem was that I was using the userGroups setting to filter the map markers by multiple user groups.
plugin.tx_wecmap_pi2 {
height = 500
width = 500
showDirections = 1
prefillAddress = 0
initialMapType = G_HYBRID_MAP
controls.mapControlSize = large
controls.showOverviewMap = 1
controls.showMapType = 1
controls.showScale = 1
userGroups = 2,3,5
pid = 2,3,5 # <-- This uses a AND condition
}
Since this setting is using an AND condition under the hood I received the error "There doesn't seem to be anything to display. Make sure the map is configured correctly and there are users or markers set"
In fact I opened a feature request for this 3 years ago. Unfortunately the feature request never made it into the plugin. But Jan Bartels posted a workaround as reply to the feature request. This workaround got lost while updating the extension.
Also recomment to the extension authors to make it more clear in their documentation that the property userGroups uses a AND condition.

How to disable HTML transformation in TYPO3 8 LTS completely

In TYPO3 8.7.8 LTS and a clean installation with the setting to create one blank basis page during install and the CKEditor extension disabled when you write something in a text element (I think it is the tt_content.bodytext field) it gets transformed (<p> tags added, line breaks removed etc...) even so there is no WYSIWYG-Editor enabled. So this transformation has to happen in the TYPO3 backend.
I'm trying to disable this now for a while but I failed so far. I tried the approaches from https://docs.typo3.org/typo3cms/CoreApiReference/Rte/Transformations/Tsconfig/Index.html
And here mainly
This configuration in "Page TSconfig" will disable the RTE altogether:
RTE.default.disabled = 1
To be precise my Page TSConfig looks like this and the transformation still happens:
RTE.default.proc.dontRemoveUnknownTags_db = 1
RTE.default.proc.entryHTMLparser_db = 0
RTE.default.proc.exitHTMLparser_db = 0
RTE.default.disabled = 1
RTE.config.tt_content.bodytext.proc.dontRemoveUnknownTags_db = 1
RTE.config.tt_content.bodytext.proc.entryHTMLparser_db = 0
RTE.config.tt_content.bodytext.proc.exitHTMLparser_db = 0
RTE.config.tt_content.bodytext.disabled = 1
So the question is, how can I disable the HTML transformations completely? Do I need to add something in the TypoScript Setup (I tried a bit but no luck) or do I have to do something completely different/in a different stop than the Page TSConfig?
Looking at (and debugging) \TYPO3\CMS\Core\Html\RteHtmlParser and here RTE_transform($value, $specConf = [], $direction = 'rte', $thisConfig = []) which seems to be the responsible function for the transformation of this field, I know that the transformations for my case happen in the mode foreach.
I also know that my RTE.default.disabled = 1 wasn't in the wrong place. It was part of the loaded config, however at least at this point it has no effect at all.
What has an effect is setting RTE.default.proc.overruleMode = none or RTE.default.proc.mode = none. One would do it and any string which is not a registered mode works to disable any transformation.
IMHO: The TYPO3 documentation seems as messy as its code base, maybe RTE.default.disabled = 1 has a use case somewhere and maybe you would find it if you would digg further into the documentation but I fear it may also just be an artefact from some old version which most of this pre- and postprocessing logic seems to be (and from what I've seen here in the last two hours I'm not confident other parts of this framework are 'modern', the mere amount of db queries for simplest backend tasks indicates I could be right). Anyways, my problem is solved and good luck to anyone who also needs to work with this reptile from the past for some reason.
tl;dr: set RTE.default.proc.overruleMode = none in your Page TSConfig

Updating Jira Plugin from Version 3 to Version 4, Replacing SearchParameter

i am pretty new to Jira Development so please be patient
I should upgrade a Plugin that worked with Jira Version 3 to work with Jira Version 4
Most of the thins went pretty well, but now i am kind of stuck
The SearchParameter and the ProjectParameter Class are not available in the new Version and i dont exacly know how to replace them. its really just this few lines of code, where its needed
these Classes are outdated: SearchParameter and ProjectParameter
i looked in the jira doc buts its seems pretty complicated, you would do me a great favor if you could help me
SearchRequest sr = srs.getFilter(ctx, filterId);
...
SearchParameter param = sr.getParam(new ProjectParameter().getName());
...
List columns = columnLayout
.getVisibleColumnLayoutItems(user,
param.getValues(), Collections.EMPTY_LIST);
It would even Help if you could explain what the seccond Line intends
Thanks in advance
I can't help you rewrite the plugin entirely, but I can try help you decipher what those quoted lines of code mean:
SearchRequest sr = srs.getFilter(ctx, filterId);
This line loads a saved SearchRequest with the corresponding filterId.
SearchParameter param = sr.getParam(new ProjectParameter().getName());
This line gets the Project search parameter that was saved in the SearchRequest. As you may know, SearchRequests (or saved filters if you prefer) all you to save a search from JIRA with parameters defined. One possible parameter to define is a ProjectParameter. So if your search is "all issues in project X", then you would have a SearchParameter in your SearchRequest which is a ProjectParameter that knows to search for project X.
List columns = columnLayout
.getVisibleColumnLayoutItems(user,
param.getValues(), Collections.EMPTY_LIST);
This line retrieves the ColumnLayoutItems which are visible to the specified user, for the specified projects of the SearchRequest (by extracting the value from the ProjectParameter of the SearchRequest as retrieved in line 2).
It's a bit unclear what this code is attempting to do without more context, but that's what those lines are doing anyway. You might find the API documentation useful:
http://docs.atlassian.com/jira/3.13/
http://docs.atlassian.com/jira/3.13/com/atlassian/jira/issue/fields/layout/column/ColumnLayout.html