I tried almost every search combination I know for this issue over the internet; been reading articles that might help resolve the issue, but I wasn't able to find any help.
Debugging (no exception during debug process), and reading logs doesn't give much information (no exceptions in the log file).
If you know a post that is related to this, please comment below. Otherwise, let me give it a try here.
Edited: Tried also in Sitecore Instance v.8.1 Update-2, same problem was encountered.
Let me describe the issue:
Using SC Instance v.8.0 Update-3 (freshly installed with no customizations)
Using WFFM v.8.0 Update-2 (compatible with SC instance 8.0-U3)
I have 11 field sections in a CONTACT US form page, here are:
The Section A is the 1st field section and the Section K is the 11th field section of my Contact Us page.
Section A
A1 Single-line text field | NOT required
A2 Single-line text field | NOT required
A3 Single-line text field | NOT required
A4 Single-line text field | NOT required
A5 Single-line text field | NOT required
A6 Single-line text field | NOT required
A7 Single-line text field | NOT required
A8 Single-line text field | NOT required
A9 Single-line text field | NOT required
A10 Single-line text field | NOT required
Section B
B1 Single-line text field | NOT required
B2 Single-line text field | required WITH NUMBERS ONLY VALIDATION
B3 Single-line text field | required WITH NUMBERS ONLY VALIDATION
B4 Single-line text field | NOT required
B5 Single-line text field | NOT required
B6 Single-line text field | NOT required
B7 Single-line text field | NOT required
B8 Single-line text field | NOT required
B9 Single-line text field | NOT required
B10 Single-line text field | NOT required
Section C
C1 Single-line text field | NOT required
C2 Single-line text field | NOT required
C3 Single-line text field | NOT required
C4 Single-line text field | NOT required
C5 Single-line text field | NOT required
C6 Single-line text field | NOT required
C7 Single-line text field | NOT required
C8 Single-line text field | NOT required
C9 Single-line text field | NOT required
C10 Single-line text field | NOT required
Section D
D1 Single-line text field | NOT required
Section E
E1 Single-line text field | NOT required
E2 Single-line text field | NOT required
Section F
F1 Single-line text field | NOT required
F2 Single-line text field | NOT required
Section G
G1 Single-line text field | NOT required
G2 Single-line text field | NOT required
G3 Single-line text field | NOT required
Section H
H1 Single-line text field | NOT required
H2 Single-line text field | NOT required
H3 Single-line text field | NOT required
H4 Single-line text field | NOT required
Section I
I1 Single-line text field | NOT required
I2 Single-line text field | NOT required
I3 Single-line text field | NOT required
I4 Single-line text field | NOT required
Section J
J1 Single-line text field | NOT required
J2 Single-line text field | NOT required
J3 Single-line text field | NOT required
J4 Single-line text field | NOT required
Section K
K1 Single-line text field | NOT required
K2 Single-line text field | NOT required
K3 Single-line text field | NOT required
K4 Single-line text field | NOT required
As shown above, there are only two (2) required fields, they are:
B2 - accepts numbers only
B3 - accepts numbers only
And the rest are optional, and can leave blank.
My ultimate goal: Just fill up the required fields, and submit the form! (Looks pretty straight forward, isn't it?)
But the problem here is, when you submitted the form page. The page will reload and creates a duplicate Section B at the bottom of the page and the Section K will be removed also. Something like this:
Surprisingly, when I deleted one (1) section to make it a total of 10 sections OR less than 10 sections then submit the form, the form will be submitted successfully and I would able to see an entry in the reporting database and in form report page.
Anyone encountered this kind of issue before? Is this a known issue? Or a bug?
Things that I least wanted to try, but just to give a shot:
Clear browser cache, check in most browsers (Firefox, IE and Chrome) - Didn't work
IISReset - Didn't work either.
Supporting files:
Video: http://screencast.com/t/wtgh2b8M1U
I packaged the form for whoever wanted to try it on their local machine
OneDrive > Download here. - Do not forget to add section K once installed.
Appreciate your time and effort. Thanks
To answer my question:
Yes, it is a bug in Sitecore. See the link below on how to implement the Sitecore patch provided by the SC support.
https://sitecorelogy.com/2016/07/19/fixed-sitecore-wffm-creates-a-duplicate-field-section-upon-submission-when-exceeded-to-10-sections/
Related
I am just into learning of Splunk queries, I'm trying to grab a data from myfile.csv file based on the regex expression.
In particular, I'm looking forward, print only the rows where column fqdn not endswith udc.net and htc.com.
Below is my query which is working but i'm writing it twice.
| inputlookup myfile.csv
| regex support_group="^mygroup-Linux$"
| regex u_sec_dom="^Normal Secure$"
| regex fqdn!=".*?udc.net$"
| regex fqdn!=".*?htc.com$"
| where match(fqdn,".")
I am trying them to combine with | separeted but not working though...
| regex fqdn!="(.*?udc.net | ".*?htc.com)$"
You can do this with a search and where clause:
| inputlookup myfile.csv
| search support_group="mygroup-Linux" u_sec_dom="Normal Secure"
| where !match(fqdn,"udc.net$") AND !match(fqdn,"htc.com$")
Or just a single search clause:
| inputlookup myfile.csv
| search support_group="mygroup-Linux" u_sec_dom="Normal Secure" NOT (fqdn IN("*udc.net","*htc.com")
You can also rewrite the IN() thusly:
(fqdn="*udc.net" OR fqdn="*htc.com")
The combined regex will work if you omit the spaces on either side of the |. The extra spaces become part of the regex and prevent matches.
There's no need for the final where command. Splunk by default will display all events that match ..
I am trying to clean up some text where there are separators with no text before/after it.
The 'types' are
3150779 | 3674-4 |Water Supply Plan
3637730 |
| 10903-155 | Layout 10903 DWG 155 29 M |
| 10903-155 | | Water Supply |
I understand [^\|]+ splits this but I want to get rid of the separator when there's no text before/after the separator. So the regex should result in
3150779 | 3674-4 | Water Supply Plan
3637730
10903-155 | Layout 10903 DWG 155 29 M
10903-155 | Water Supply
I would like to apply this in a google sheet where the cleaned text goes only into one column.
See https://regex101.com/r/GzbCEU/1
I have also tried [\s]+\|\s(.*) and this selects the separators but doesn't clean the text.
--- UPDATE ---
When I try the suggestion from Pushpesh Kumar Rajwanshi I get no value in GSheet...
and also same issue
You can use this regex,
^ *(?:\| *)+| *(?:\| *)+$|(\| *){2,}
Explanation:
There are three alternation parts for handling three cases.
^ *(?:\| *)+ - This one replaces all the | that are in the beginning optionally having spaces in middle of them
| - Alternation
*(?:\| *)+$ - This one replaces all the | that are in the end optionally having spaces in middle of them
(\| *){2,} - This one replaces all the | that are more than two optionally having spaces in between them but preserves the last spacing.
And replace it with $1 that works in google sheets.
Notice the replacement with $1 only happens when | are matched in third alternation group where it just retains one | out of multiple.
Demo
Edit: screenshots showing how to find/replace using regex,
Before replacement
After replacement
I think this re should work for you:
/[ ]*(?<![\d][ \*])\| | \|$/gm
Demo (be sure to open the "Substitution" accordion at the bottom of the demo page to see output)
$re = '/[ ]*(?<![\d][ \*])\| | \|$/m';
$str = '3150779 | 3674-4 | Water Supply Plan
3637730 |
| 10903-155 | Layout 10903 DWG 155 29 M |
| 10903-155 | | Water Supply |';
preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0);
// Print the entire match result
var_dump($matches);
Output:
3150779 | 3674-4 | Water Supply Plan
3637730
10903-155 | Layout 10903 DWG 155 29 M
10903-155 |Water Supply
I have the following street constellations:
| Street name | extracted value |
| --------------------------------------- | --------------- |
| Lilienstr. 12a | 12a |
| Hagentorwall 3 | 3 |
| Seilerstr. 14 (Eingang Birkenstr.) | 14 |
| Guentherstr. 43 B | 43 B |
| Eberhard-Leibnitz Str. 1 WH 5B 241 | 1 |
| 1019-1781 Borderlinx C/O SEKO Logistics | - |
My Regex is partially working (https://regex101.com/r/KumamP/2):
\d+(?:[a-zA-Z]$|\s[a-zA-Z]$)?
Someone has got a better solution for me? Eberhard-Leibnitz Str. should only give me one result or none. 1019-1781 Borderlinx C/O SEKO Logistics should give me none result.
The following regex is working for your example
^[ \-a-zA-Z.]+\s+(\d+(\s?\w$)?)
https://regex101.com/r/KumamP/4
The basic assumption is (like your samples suggest), that valid "street constellations" always start with a street name followed by the street/house number.
The next regex is also working if there is an entry like Straße des 17. Juni 1:
^[ \-0-9a-zA-ZäöüÄÖÜß.]+?\s+(\d+(\s?[a-zA-Z])?)\s*(?:$|\(|[A-Z]{2})
https://regex101.com/r/KumamP/5
But as the commentators already wrote, it is difficult to distinguish via an regular expression between numerical street name parts and the street number. Even more if you allow "unspecified" suffixes like (Eingang Birkenstr.) or WH 5B 241 in your example.
Parsing address lines is not trivial. Many countries have their own special rules and Germany and Austria are really tricky.
To understand better the examples you provided, there's one in special that shows the point:
"Eberhard-Leibnitz Str. 1 WH 5B 241"
The "WH" here stands for "Wohnung", but they usually use just "W" (and use some separator like "//"). So it would be more like:
"Eberhard-Leibnitz Str. 1 // W 5B 241"
It's also common to find "co" or "c/o" or "z. H" (abbreviation for "zu Händen von"). And anything that follows it, it's just the mailbox's name.
And last but not least, the address line could also contain the zip code + city name. Depends on the API you're interacting with, or if it's user input (it can get very wild then!).
So, to properly parse address lines, you should first normalize them, by removing that extra information. Then you can use a regex. Take a look at this gem: https://github.com/matiasalbarello/address_line_divider
Some good reads about the topic:
https://www.german-way.com/germans-we-dont-need-apartment-numbers/
https://allaboutberlin.com/guides/addressing-a-letter-in-germany
http://interactive.zeit.de/strassennamen/
I have a 130k line text file with patent information and I just want to keep the dates (regex "[0-9]{4}-[0-9]{2}-[0-9]{2} ") for subsequent work in Excel. For this purpose I need to keep the line structure intact (also blank lines). My main problem is that I can't seem to find a way to identify and keep multiple occurrences of date information in the same line while deleting all other information.
Original file structure:
US20110228428A1 | US | | 7 | 2010-03-19 | SEAGATE TECHNOLOGY LLC
US20120026629A1 | US | | 7 | 2010-07-28 | TDK CORP | US20120127612A1 | US | | EXAMINER | 2010-11-24 | | US20120147501A1 | US | | 2 | 2010-12-09 | SAE MAGNETICS HK LTD,HEADWAY TECHNOLOGIES INC
Desired file structure:
2010-03-19
2010-07-28 2010-11-24 2010-12-09
Thank you for your help!
Search for
.*?(?:([0-9]{4}-[0-9]{2}-[0-9]{2})|$)
And replace with
" $1"
Don't put the quotes, just to show there is a space before the $1. This will also put a space before the first match in a row.
This regex will match as less as possible .*? before it finds either the Date or the end of the row (the $). If a date is found it is stored in $1 because of the brackets around. So as replacement just put a space to separate the found dates and then the found date from $1.
I am trying to do a regex match and replace for hotfile.com links to mp3 files i have in my database (Wordpress).
I used to use hotfile for streaming mp3 files on my site, now i switched to a CDN, could someone kindly help me out with this:
Replace: http//hotfile.com/dl/157490069/c8732d4/mp3_file_name.mp3
With: http//p.music.cdndomain.com/vod/music.folder/2010/mp3_file_name.mp3
I have been trying a simple Search and Replace like this: http//hotfile.com/dl/%/%/, but its not working.
It would have been easier to perform a search and replace if hotfile.com didn't have different folders for all files, below is 2 examples of the problem:
http//hotfile.com/dl/155490069/c7932d4/
http//hotfile.com/dl/165490070/c8745e7/
I have over 500 files to replace.
Thanks
Since you must be using mysql for your wordpress database, you can do this replacement either by regex as you asked:
Regex pattern : #http://(www.)?hotfile.com/\w+/\w+/\w+/#
Replacement pattern: http//p.music.cdndomain.com/vod/music.folder/2010/
An alternate simpler solution would be to extract the mp3 file name using simple string functions of mysql e.g.
Use SUBSTRING or SUBSTRING_INDEX to extract file name of your mp3 file i.e. find the string after last occurence of "/" in your hotfiles url.
Use CONCAT to append the file name retreived to new url prefix and update it in the database.
Here is an example, you can appropriately change it for your database:
mysql> select * from test_songs;
+---------------------------------------------------------------+
| song_url |
+---------------------------------------------------------------+
| http://hotfile.com/dl/157490069/c8732d4/mp3_file_name.mp3 |
| http://www.hotfile.com/dl/123412312/dd732d4/mp3_song_name.mp3 |
+---------------------------------------------------------------+
Taking substrings:
mysql> select SUBSTRING_INDEX(song_url,"/",-1) from test_songs;
+----------------------------------+
| SUBSTRING_INDEX(song_url,"/",-1) |
+----------------------------------+
| mp3_file_name.mp3 |
| mp3_song_name.mp3 |
+----------------------------------+
2 rows in set (0.03 sec)
Creating final update query:
mysql> Update test_songs set song_url =
CONCAT("http//p.music.cdndomain.com/vod/music.folder/2010/",
SUBSTRING_INDEX(song_url,"/",-1)) ;
Query OK, 2 rows affected (0.00 sec)
Rows matched: 2 Changed: 2 Warnings: 0
Checking the results :
mysql> select * from test_songs;
+---------------------------------------------------------------------+
| song_url |
+---------------------------------------------------------------------+
| http//p.music.cdndomain.com/vod/music.folder/2010/mp3_file_name.mp3 |
| http//p.music.cdndomain.com/vod/music.folder/2010/mp3_song_name.mp3 |
+---------------------------------------------------------------------+
2 rows in set (0.00 sec)
Done !
Something as simple as http://regex101.com/r/lK9wH4 should work:
/^.+\/(.+)$/ and replace with <your_new_url>\1.
Good luck.
you can use notepad++ to search and replace all your files
for this particular sample:
search and replace in regex mode:
search "http//hotfile.com/(.)/(..mp3) "
replace "http//p.music.cdndomain.com/vod/music.folder/2010/\2 "
remove the quote mark but keep the space at the end
updated: screencapture for notepad++