I get a conflict in EXT:realUrl because of a page with the same name in both domains.
domain.com/contact.html
mobile.domain.com/contact.html
I got this setup:
The realurl configuration in PHP both with their own rootpage_id:
['EXTCONF']['realurl']['_DEFAULT']
['EXTCONF']['realurl']['mobile.domain.com']
TypoScript:
config.baseURL = http://mobile.domain.com/
config.tx_realurl_enable = 1
config.typolinkCheckRootline = 1
config.typolinkEnableLinksAcrossDomains = 1
config.typolinkLinkAccessRestrictedPages = NONE
config.prefixLocalAnchors = all
config.content_from_pid_allowOutsideDomain = 1
Is there something missing in my configuration?
What could I do to solve the conflict?
When you have following steps
Step 1
$TYPO3_CONF_VARS['EXTCONF']['realurl']['mobile.example.com'] =
$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'];
$TYPO3_CONF_VARS['EXTCONF']['realurl']['mobile.example.com']['pagePath']['rootpage_id'] = 999;
Step 2
Add Domain Entries on the rootpages
Step 3
Add setup condition
[globalString = IENV:HTTP_HOST=www.example.com]
config.baseURL = http://www.example.com/
[end]
Step 4
Clear all caches (realUrl caches inkl.)
Greetings
Related
Before the update to TYPO3 9.5 I used the following condition syntax in setup.typoscript to enable sending an email to the sender using a checkbox in the frontend form:
[globalString = GP:tx_powermail_pi1|field|emailanabsender|0 = ]
plugin.tx_powermail.settings.setup.sender.enable = 0
[else]
plugin.tx_powermail.settings.setup.sender.enable = 1
[global]
What should the symfony condition syntax look like for this purpose?
According to my logic, the following should work, but it does not:
[traverse(request.getParsedBody(), 'tx_powermail_pi1/field/emailanabsender/0')]
plugin.tx_powermail.settings.setup.sender.enable = 1
[else]
plugin.tx_powermail.settings.setup.sender.enable = 0
[global]
Can anyone help me with this?
I got It.
The correct syntax for TYPO3 >= 9 is:
[traverse(request.getParsedBody(), 'tx_powermail_pi1/field/emailanabsender/0') == '']
plugin.tx_powermail.settings.setup.sender.enable = 0
[else]
plugin.tx_powermail.settings.setup.sender.enable = 1
[global]
The docs says: "In case the path is not found in the array, an empty string is returned."
Data from the POST request can be read with request.getParsedBody(), and
if the checkbox is unchecked, then it's missing in the POST-request.
What about this:
[traverse(request.getQueryParams(), 'tx_powermail_pi1/field/emailanansender/0') > 0]
I using sphinx search to create indexes and search data in my PostgreSQL database.
I have 2 questions about it.
If I run command
/usr/bin/indexer --config /etc/sphinxsearch/sphinx.conf --rotate --all
I get output from 'show tables;'
Index
Type
dist_title_de
distributed
word_title_de
local
word_titlestemmed_de
local
rt_title_de
rt
But If I run command
/usr/bin/indexer --config /etc/sphinxsearch/sphinx_another_conf_file.conf --rotate --all
Then I get the same output on terminal, but I dont see new indexes on 'show tables;'. It seems like '--config' option in indexer not working and only properly name is sphinx.conf. It's problematic, because if I want reindex sphinxsearch I have to changing file sphinx.conf.
Second question is it possible to 'add' new index without delete old ones? Currently I using sphinx like (everyday):
Get new data (datasource1, datasource2, ..., datasource8)
Index --rotate --all (index data from 8 datasources)
Search some info on indexes
Write it to db
But now, I want sth like:
Get new data from datasource1
Index datasource1
Get new data from datasource2
Index datasource2 (without delete index datasource1)
Search something in index datasource1
....
Get new data form datasource8 (without deleteing indexes)
Index datasource8
etc
On 'without delete index' I mean, now if I use command from top of topic, I 'lost' my indexes and get only new ones (from sphinx.conf).
My sphinx.conf (only 1 datasource):
source src_title_de
{
type = pgsql
sql_host = #######
sql_user = #######
sql_pass = #######
sql_db = #######
sql_port = 3306 # optional, default is 3306
sql_query = \
SELECT id, group_id, (date_extraction::TIMESTAMP) AS date_extraction, title \
FROM sphinx_test
sql_ranged_throttle = 0
}
index word_title_de
{
source = src_title_de
path = /var/lib/sphinxsearch/data/word_title_de
docinfo = extern
dict = keywords
mlock = 0
morphology = none
stopwords = /var/lib/sphinxsearch/data/stopwords.txt
wordforms = /var/lib/sphinxsearch/data/wordforms_de.txt
min_word_len = 1
}
index word_titlestemmed_de : word_title_de
{
path = /var/lib/sphinxsearch/data/word_titlestemmed_de
morphology = stem_en
}
index dist_title_de
{
type = distributed
local = word_title_de
local = word_titlestemmed_de
agent = localhost:9313:remote1
agent = localhost:9314:remote2,remote3
agent_connect_timeout = 1000
agent_query_timeout = 3000
}
index rt_title_de
{
type = rt
path = /var/lib/sphinxsearch/data/rt_title_de
rt_field = title
rt_field = content
rt_attr_uint = gid
}
indexer
{
mem_limit = 128M
}
searchd
{
listen = 9312:sphinx
listen = 9306:mysql41
log = /var/log/sphinxsearch/searchd.log
query_log = /var/log/sphinxsearch/query.log
read_timeout = 5
client_timeout = 300
max_children = 30
persistent_connections_limit = 30
pid_file = /var/run/sphinxsearch/searchd.pid
seamless_rotate = 1
preopen_indexes = 1
unlink_old = 1
mva_updates_pool = 1M
max_packet_size = 8M
max_filters = 256
max_filter_values = 4096
max_batch_queries = 32
workers = threads # for RT to work
}
My second file for 8 datasources like the same like above with CTRL+C CTRL+V on 'source src_title_de', 'index word_title_de', 'index word_titlestemmed_de', 'index rt_title_de' with another countries and change table with data in 'sql_query'.
On your first question, the --config option only applies to that indexer run. Ie the --all should cause it index (or try to ) index all the plain indexes mentioned in that file.
... but when it sends the signal to reload (what the --rotate) does, searchd just reloads its CURRENT config file, NOT the one you told indexer about.
To get serachd to use a new config file would have to stop searchd, and start it again with new config file.
So change sphinx.conf directly, rather than a 'second' file.
Acully the second question is the same answer...
So change sphinx.conf directly, rather than a 'second' file.
Ie add your new index to sphinx.conf, use indexer to 'build' it. When indexer has finished, it will tell 'reload' whcih will cause searchd to load the new config file AND the new index just built.
I'm getting the following error while trying a wildcard(*) enabled search in Sphinx 2.0.6
index products: syntax error, unexpected $undefined near '*'
My search term is iphone 4s*
It's using the products index as defined below.
index users
{
enable_star = 1
docinfo = extern
morphology = stem_en
charset_table = 0..9, A..Z->a..z, _, a..z, U+410..U+42F->U+430..U+44F, U+430..U+44F
ignore_chars = U+0021..U+002F,U+003A..U+003F,U+0060
charset_type = utf-8
html_strip = 0
source = gdgt_user
path = /var/lib/sphinxsearch/data/gdgt/users
min_infix_len = 3
min_word_len = 3
}
index products : users
{
enable_star = 1
min_infix_len = 1
min_word_len = 1
source = gdgt_products
path = /var/lib/sphinxsearch/data/gdgt/products
}
I am using the php api that can be found in the source tar ball.
I am able to see the error when using search CLI.
search -c app/config/sphinx.compiled.conf -i products -e "ipho*"
Sphinx 2.0.6-id64-release (r3473)
Copyright (c) 2001-2012, Andrew Aksyonoff
Copyright (c) 2008-2012, Sphinx Technologies Inc (http://sphinxsearch.com)
using config file 'app/config/sphinx.compiled.conf'...
index 'products': search error: .
My php code looks like
$client = new SphinxClient();
$client->SetServer($serverIp, $serverPort);
$client->SetMaxQueryTime(5000);
$client->SetSortMode(SPH_SORT_RELEVANCE);
$client->SetMatchMode(SPH_MATCH_EXTENDED);
$res = $client->query('ipho*', 'products');
var_dump($res, $client->getLastError(), $client->getLastWarning());
The issue is that star(*) for wildcard is also in your ignore_chars (U+002A).
Update it to:
ignore_chars = U+0021..U+0029,U+002B..U+002F,U+003A..U+003F,U+0060
A college of mine has set up a page with tt_news single, list and archive.
He has an archive list in a sidebar on all these pages and it lists the years from each news as it should.
I can click on each year and view the news from that year fine when logged in.
But when I log out the date is not changed. It stays at what date was first clicked when the "SHOW ARCHIVED" setting was set.
The url changes but the page doesn't...
I have:
tt_news v2.5.2
Typo3 v4.5.4
CoolURI v1.0.26
CoolUri conf: http://pastebin.com/9xTmVyPn
tt_news typoscript:
plugin.tt_news {
templateFile = fileadmin/templates/ext/blog.html
displayArchivedInLatest = 1
datetimeMinutesToArchive = 1
enableArchiveDate = 0
# page with archive list
archiveTypoLink.parameter = 286
# page with single view
singlePid = 285
# page with list view
backPid = 284
# page with db entries
pid_list = 35
displaySingle.date_stdWrap.strftime = %e:e %B %Y
displayList.date_stdWrap.strftime = %e:e %B %Y
pageBrowser {
tableParams >
}
summary {
wordWrap = 105 | ... | 1
}
imgMaxWidth = 600
}
Perhaps you have an caching issue? Just test it via www.example.com/your/url/?no_cache=1 If that works if you are not logged in, you have an caching issue.
I've just change my OS to Windows 7 64.
I have Apache 2.2, PHP 5.3 (32bit) TS and Eclipse 3.7 (64bit) with PDT installed on my machine.
xDebug section in my php.ini
zend_extension = "C:\Program Files (x86)\PHP\ext\php_xdebug-2.1.4-5.3-vc9.dll"
xdebug.auto_trace = 0
xdebug.collect_includes = 1
xdebug.collect_params = 0
xdebug.collect_return = 0
xdebug.default_enable = 1
xdebug.extended_info = 1
xdebug.idekey = "STATION24$"
xdebug.max_nesting_level = 100
xdebug.profiler_append = 0
xdebug.profiler_enable = 0
xdebug.profiler_enable_trigger = 1
xdebug.profiler_output_dir = "C:\WINDOWS\temp"
xdebug.profiler_output_name = "xdebug_profile.%p"
xdebug.remote_autostart = 0
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "localhost"
xdebug.remote_log = 1
xdebug.remote_mode = "req"
xdebug.remote_port = 9001
xdebug.show_exception_trace = 0
xdebug.show_local_vars = 0
xdebug.show_mem_delta = 1
xdebug.trace_format = 0
xdebug.trace_output_dir = "C:\WINDOWS\Temp"
xdebug.trace_output_name = "trace.%c"
xdebug.var_display_max_depth = 5
In Eclipse I've configured PHP->Debug section as shown on images:
And now, when I try to launch debug, Eclipse freeze at starting debug session.
So, I'd read about this problem in past, people say this is because some application use xDebug port (in my case 9001), but I've checked, no other use this port, only xDebug do.
My firewall disabled, so no one application can block connection to xDebug. And one thing - "debug as CLI application" works well, only "debug as Web application" does not work.
I don't know what to do, please help.
If you run into problems and you don't know whether the Xdebug side is not working, or the IDE's side, then from Xdebug 2.2.0RC1 the remote debug log will also log connection issues.
Just a thought, you mention PHP TS. Maybe you should use xdebug TS too then?
(Although I read everywhere that lately you better not use TS at all, so might want to change php not TS or so).