friendsoftypo3 / tt_address Goto Github PK
View Code? Open in Web Editor NEWAdd address / contact datasets to your content management system.
License: GNU General Public License v2.0
Add address / contact datasets to your content management system.
License: GNU General Public License v2.0
Added by Alex Kellner
from https://forge.typo3.org/issues/77146
Currently we're doing a large migration and within this project, we want to migrate from tt_adddress 2.3.5 to 3.0.3.
Because of some valid reasons we call your update script from a CommandController, what basicly works like a charm.
Nevertheless, there are 2 or 3 categories that are throwing an exception when trying to import.
This may happen because the customer has strange datamanagement and I'm not sure why this categories are failing with:
array(4 items)
caller => "TYPO3\CMS\Core\Database\DatabaseConnection::exec_UPDATEquery" (60 chars)
ERROR => "You have an error in your SQL syntax; check the manual that corresponds to y
our MySQL server version for the right syntax to use near '' at line 1" (146 chars)
lastBuiltQuery => "UPDATE sys_category SET parent='67' WHERE uid=" (46 chars)
debug_backtrace => "call_user_func#27 // {closure}# // TYPO3\CMS\Backend\Console\Application->ru
n#26 // TYPO3\CMS\Core\Core\Bootstrap->handleRequest#73 // TYPO3\CMS\Backend
\Console\CliRequestHandler->handleRequest#302 // call_user_func#69 // TYPO3\
CMS\Core\Cache\Backend\SimpleFileBackend->{closure}# // TYPO3\CMS\Extbase\Co
re\Bootstrap->run#154 // TYPO3\CMS\Extbase\Core\Bootstrap->handleRequest#193
// TYPO3\CMS\Extbase\Mvc\Cli\RequestHandler->handleRequest#206 // TYPO3\CMS
\Extbase\Mvc\Dispatcher->dispatch#91 // TYPO3\CMS\Extbase\Mvc\Controller\Com
mandController->processRequest#86 // TYPO3\CMS\Extbase\Mvc\Controller\Comman
dController->callCommandMethod#139 // call_user_func_array#257 // In2code\In
2template\Command\ImportCommandController->ttAddressGroupsImportCommand# //
TYPO3\TtAddress\Updates\AddressGroupToSysCategory->performUpdate#91 // TYPO3
\TtAddress\Updates\AddressGroupToSysCategory->updateParentFieldOfMigratedCat
egories#103 // TYPO3\CMS\Core\Database\DatabaseConnection->exec_UPDATEquery#
264 // TYPO3\CMS\Core\Database\DatabaseConnection->debug#268" (1048 chars)
A simple solution is to typecast two variables in \TYPO3\TtAddress\Updates\AddressGroupToSysCategory::updateParentFieldOfMigratedCategories():
$sysCategoryUid = (int)$oldNewCategoryUidMapping[$row['uid']];
$newParentUid = (int)$oldNewCategoryUidMapping[$row['parent_group']];
When evaluating address extensions, it's helpful to know which fields an address record contains.
This should be listed in the manual (or a screenshot of the backend).
Hi dears,
as far as I see, in
EXT::/pi1/tx_ttaddress_pi1.php
at line 461 you treated the $spConf variable as an Array - but it isn't.
Though the 'hasOneOf' configuration option does not work.
I changed
if ($spConf['hasOneOf'] && !$this->hasOneOf($spConf['hasOneOf'], $address)) {
to
if($spName === 'hasOneOf' && !$this->hasOneOf($spConf,$address)) {
and all works fine.
HTH
Tom.
In TYPO3 8, in class.tx_ttaddress_pi1.php line 394, this MUST be:
'data' => 'file:current:originalUid'
Otherwise no image will be shown.
Hi,
since the Update the treeview is missing
include_once(/var/www/vhosts/xxx.de/httpdocs/typo3conf/ext/tt_address/class.tx_ttaddress_treeview.php): failed to open stream
Is there any Document that shows how to migrate to version 3?
Is it possible to crop / scale the image in the TS?
But I think this is probably obsolete when the Fluid version is released.
#34
Hi,
I upgraded a typo3 Installation of mine for 4.5.x to 7.6.5. I am rendering tt_address objects within a page, showing the associated image. In 4.5.x this worked fine with the following typoscript:
SNIPPET:
10 = IMAGE
10.file.import = uploads/pics/
10.file.import.field = image
10.file.import.listNum = 0
10.file.width = {$content.tt_address.image.width}
10.wrap = |
Now, this doesn't render anything useful anymore. I think, the image is no longer located in the tt_address table (using tt_address 3.0.3), but somehwere else.
Can you help and explain, how to render the image from tt_address records now?
Thanks in advance, Manfred
Line 407, after:
country'
There has to be a comma!
in typo3 8lts
in getItemMarkerArray function:
'file.' => array(
'height' => $height.'c',
'import.' => array(
'data' => 'file:current:uid'
),
gives me the wrong relations, i have to use
'file.' => array(
'height' => $height.'c',
'import.' => array(
'data' => 'file:current:originalUid'
),
greetings
jochen
hi,
maybe it's more a question as an issue.
This is the DB Query for singleRecords
$addresses = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
'*',
'tt_address',
'uid IN(' . $uidList . ') ' . (!empty($this->conf['pidList']) ? ' AND pid IN (' . $this->conf['pidList'] . ')' : '')
. $this->cObj->enableFields('tt_address')
);
why you ask for pidList, uid should be enough as unique identifier. or not?
Problem is, if you don't set a pidList in TS or Flexform the pidList is set to $GLOBALS['TSFE']->id in init()
$pages = $pages ?
implode(GeneralUtility::intExplode(',', $pages), ',') :
$GLOBALS['TSFE']->id;
so in the DB Query there is always a pidList and you must set the correct pidList if you only want to use singleRecords, it's very confusing for an integrator.
best regards
Sven
Hi,
latitude and longitude should be defined as DECIMAL in MySQL.
MySQL does not work properly with lomg numbers defined as FLOAT.
At last this ends in an error-message in TYPO3-Backend:
"These fields of record *** in table "tt_address" have not been saved correctly: latitude, longitude! The values might have changed due to type casting of the database."
(So long as latitude and longitude are shown in the backend by TCA ;-)).
Thank you!
Field is not shown and editable. It is defined in ext_tables.sql, even in columns section of TCA and in the field list, but not in the type declaration.
So this seems just to be a mistake instead of removing this field.
If you use helhum/typo3secure-web to secure your TYPO3 CMS installation and have public assets in root only, the template code is not fetched anymore.
This happens because \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::fileResource generates a relative file path like typo3conf/ext/tt_address/Resources/Public/LegacyPluginTemplate/default.html (that file does even work because the Public folder is linked in your web root). Using an own template having it in a Private folder, doesn't return any code as it isn't found in the current working directory (which IMHO is the public web directory). Using file_get_contents with an absolute path solves this problem.
Suggestion would be:
'www' => [
'label' => $generalLanguageFilePrefix . 'locallang_general.xlf:LGL.www',
'config' => [
'type' => 'input',
'renderType' => 'inputLink',
'eval' => 'trim',
'size' => '20',
'max' => '255',
'softref' => 'typolink,url',
'fieldControl' => [
'linkPopup' => [
'options' => [
'title' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:header_link_formlabel',
'blindLinkOptions' => 'mail,file,spec,folder',
'windowOpenParameters' => 'height=600,width=800,status=0,menubar=0,scrollbars=1',
],
],
],
],
],
But don't know how to handle the compatibility issue with < 8
You always have to insert a birthday in TYPO3 8, otherwise you get a mysql error with strict mode on.
Solution, if you do not need birthday... overwrite TCA with TCA/Overrides/tt_address.php
$GLOBALS['TCA']['tt_address']['palettes']['contact']['showitem'] = 'email, --linebreak--,phone, fax, --linebreak--,mobile, --linebreak--,www, --linebreak--,';
If settings.sortBy is not set there is an exception Unknown column 'tt_address.single_selection' in 'order clause'
.
Tested with TYPO3 9.5.2-dev and tt_address commit ca74c7d
Property linkedin is spelled "linkedIn" in the domain model, but "linkedin" in database.
Therefore a mapping is necessary in ext_typoscript_setup.txt
Just rename the property and its getter/setter in the domain model, so the mapping is not needed anymore.
Hello,
I updated tt_address today and my vcard-Images were gone/mixed in Frontend. Something is not working right.
Most images were gone, one was showing a wrong image. In Backend everything was right.
I reinstalled 3.2.2, and everything was ok again, but maybe it's good to know.
with the best regards,
Sabine
Hi,
This ext would be better if it includes multiple address like personal and work and same goes for phone and email.
We have a specific use case where we use SVG sprites and we want to use a sprite image as fallback.
For this we have to use some <svg ...></svg>
as output but so far placeholderImage
just supports paths.
Hi, I'm pretty new to Typo3 and tried to over write some functions.
1.) I just want this extension to give me the plin text I type in in the fields.
So when I type in (in field Mail) "[email protected]
" i also want to set the value of the Marker ###EMAIL###
to be "[email protected]
" and not:
<a href="mailto:[email protected]" class="email" item="email">[email protected]</a>
So my question is: how can I overwrite this function in a way which is still working when I update the extension? (editing "ext/tt_address/static/pi1/setup.txt" worked but will get overwritten at the next update)
I already tried overwriting this function by setting the values to other values in typoscript but it did not work.
email {}
email.typolink.ATagParams = class="btn btm-primary" email.typolink.parameter.field = normal
email.wrap = <a href="mailto:|" class="btn btn-primary"><i class="glyphicon glyphicon-envelope"></i>E-Mail</a>
2.) Every template gets wraped in a div with the class "tx-tt_address-pi1
" to avoid this, I also had to edit the Main function.. is there any other way to solve this problem, as It kills my design if there is another div between? Is there maybe a option or a way to overwrite it?
3.) I'm running on Typo3 8.7.15 and Pictures does not get shown in the frontend.. tried many formates (.svg, .png, .jpg..) but none of them get shown in the frontend, even after reinstalling the Extension and resetting the Typoskript. Just made a clean install just to test this, but its not working.
Thank you very much in advance
Best regards,
Martin
When rendering the FILES content object, all typoscript configuration values that are not of type array or string are ignored (see TYPO3\CMS\Core\TypoScript\TypoScriptService->explodeConfigurationForOptionSplit). Some parameters in the typoscript configuration for the image rendering are declared as integers in PHP. They should be changed to string values. Otherwise image rendering is broken, as image reference UIDs are treated as file UIDs.
In FriendsOfTYPO3\TtAddress\Service\CategoryService
#87 the parameter idList
is a string, but the function needs an array.
Added by Stefan Neufeind
moved from: https://forge.typo3.org/issues/59100
There are not too many translation-strings in the extension. But it would imho be a great step to use the central translation-server and download additional languages through the Language-module in TYPO3 etc.
http://translation.typo3.org/
Add existing translation-strings on the translation-server.
Added by Volker Burggräf
moved from: https://forge.typo3.org/issues/75940
When selecting a category to display the markers of a bunch of tt_address records, the following error appears in the page instead of the map:
"Oops, an error occurred! Code: 2016042710595178ef3d25"
The "code" apparently consists of the current timestamp (20160427105951) and a random string of 8 chars.
Wenn using only single tt_address recores, the map works, but as soon as I add a "category", the error appears.
On a typo3 6.2.17 (php 5.5.31), the update wizard for address groups is missing.
The update wizard for images is included and works as it should do.
But the one for migrating address groups is missing at all.
Reason is not a bug in the updater, but a bug when including it in ext_localconf.php, as the same hook is used twice and the second one overrides the first. The keys have just to be made unique:
// Update scripts
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update']['tt_address_group'] = 'TYPO3\\TtAddress\\Updates\\AddressGroupToSysCategory';
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update']['tt_address_group'] = 'TYPO3\\TtAddress\\Updates\\ImageToFileReference';
Added by Fabian Thommen
moved from: https://forge.typo3.org/issues/48949
Now I have to add a single address entry to a address group tho show it in the FE. It should be possible to chose an PID and show all addresses.
Some recherche on the internet showed this was possible befor V2. Now there is only this ugly workaround:
see here for a more detailed problem description: FriendsOfTYPO3/compatibility6#15
The current version tt_address 3.2.3 seems to be incompatible with Typo3 9.3.3:
Are there plans to make tt_address compatible with Typo3 9.x? Maybe I can help.
There is a key named 'foreign_types' in the image configuration which is no longer used in the current Typo3 version. This should be
'overrideChildTca' => array(
'types' => array(
If you install a brandnew TYPO3 CMS version 8.5.1 with the actual EXT_ttaddress version 3.2.1, which is marked as "stable" there are no results in FE and only a blank page. Is this version really TYPO3 version 8 compatible? I dubt it. Also a lot of labels of the fields in the BE in the list view are missing.
Are there any plans concerning adapting and fixing this EXT:?
Thanks for feedback.
Regards,
Angelo
lat and long are available in TCA, but not used yet. why?
When MySQL is in strict Mode, TCA fields need some modifications.
For example the field Birtday needs the following changes:
From:
'eval' => 'date',
To:
'eval' => 'datetime,int',
Also there should be a default => 0
for all fields
At least this has to be done to birthday
and `sys_language_uid' to make it work on TYPO3 8.7 and MySQL in strict mode which is default from MySQL 5.7
moved from https://forge.typo3.org/issues/44351 Added by Ingo Renner
f.e.:
Name
Name
Street ###
ZIP City
Have different layouts in the backend form depending on the selected country
adjust frontend layout according to backend layout / selected country
Hello,
as suggested, a repost on github:
We observed a little problem with the auto created "name" field:
Behaviour now: If you clear the other three name fields (first/middle/last) and save, then the "name" field stays filled with the previous content.
Should be: If you clear the other three name fields (first/middle/last) and save, then the "name" field should be cleared as well.
Can be tested with any address entry in the backend, with version 3.2.1.
It would be really nice to be able to use fluid templates and there is a PR, see
Can someone give Feedback?
I have the following setup:
Typo3 7.6.15
tt_address 3.2.2
direct_mail 5.2.0
direct_mail_subscription 2.0.4
I wanted to add the field "country" to the subscription-page so I added the following to my template:
<label for="fe_ttaddress_country_input" id="label-fe_ttaddress_country">Country*</label>
<select class="form_dropdown" name="FE[tt_address][country]" id="fe_ttaddress_country_input" style="text-align-last:center">
<option value selected disabled>--Choose--</option>
<option value="inland">some country</option>
<option value="abroad">others</option>
</select>
To my constants as well to my setup on the subscription-page-template I've added the following:
plugin.feadmin.dmailsubscription.create.fields = last_name, first_name, title, country, hidden, email, module_sys_dmail_html
plugin.feadmin.dmailsubscription.create.required = title, country, last_name, first_name, email
plugin.feadmin.dmailsubscription.edit.fields = last_name, first_name, title, country, hidden, email, module_sys_dmail_html
plugin.feadmin.dmailsubscription.edit.required = title, country, last_name, first_name, email
(I had to add them in both constants and setup; if missing in constants the title is not being saved in tt_address, if missing in setup, the error message "this field is required" is shown on the subscription page.)
The field is being shown but the value from the country-select is not being transmitted to the tt_address table in the database.
With the title I did exactly the same and it works like a charm.
I've seen a solution to this problem (I don't seem to be the only one with this issue) but this would require to install kickstarter and extend the tt_address extension. As I'm quite a freshman to typo3 (especially to the configurations) this seems to be rather difficult when the solution could be so easy.
The issue doesn't only seem to apply to the country field but to almost all fields in the address-group of the contacts-tab from tt_address.
Am I missing something or does this really not work? Is there a way (other than extending the extension) to achieve adding a country to the subscription?
I would be grateful for any pointers or help.
Greetings, Kathara
This has been moved manually from forge.typo3.org (originated by Stefan Neufeind)
Description:
xliff is used since quite a while now. I'm not sure if it's maybe even mandatory for using translation.typo3.org for this extension.
In this step maybe also move the translation-files to their "new" home - Extbase-like hierarchy: Resources/Private/Language/
If i add a second template and select the new template in the plugin (so not using the default) the e-mail address is no longer rendered as an separate html tag (<a>
), it is only text.
The new template uses the same code as the default template.
EXT:tt_address
: 3.2.2
TYPO3
: 7.6.22
Hi.
I run into an issue since the style selection isn't working anymore. I debugged it an there seems to be an issue within the AbstractFilesToSelector.php (line 37).
So I changed the line from
$thePageId = $params['row']['pid'];
to
$thePageId = $params['flexParentDatabaseRow']['pid'];
to get the Template-Files within our fileadmin/... subfolder shown again.
We are not aware if this is the right way, but it seems the first entry isn't providing the page id it should.
Can someone confirm the usage is right or let me know how to change it right?
Regards
RM
Hi, sorting with TS is not possible. In class.tx_ttaddress_pi1.php on line 178-187 the parameter $sortOrder gets always the value from the flexform, because the flexformfield "sortOrder" has the default value "ASC". So it would be better to make an empty default value in the flexform, to be able to sort from TS and flexform.
<sortOrder>
<TCEforms>
<label>LLL:EXT:tt_address/pi1/locallang_ff.xml:pi1_flexform.sortOrder</label>
<config>
<type>select</type>
<items type="array">
<numIndex index="0" type="array">
<numIndex index="0"></numIndex>
<numIndex index="1"></numIndex>
</numIndex>
<numIndex index="1" type="array">
<numIndex index="0">LLL:EXT:tt_address/pi1/locallang_ff.xml:pi1_flexform.sortOrder.ascending</numIndex>
<numIndex index="1">ASC</numIndex>
</numIndex>
<numIndex index="2" type="array">
<numIndex index="0">LLL:EXT:tt_address/pi1/locallang_ff.xml:pi1_flexform.sortOrder.descending</numIndex>
<numIndex index="1">DESC</numIndex>
</numIndex>
</items>
<default></default>
</config>
</TCEforms>
</sortOrder>
Hello,
currently it's not possible to localize records. Is it planned to provide this function?
How it is supposed to handle it currently?
Best regards
Evelyn
With tt_address 3.2.2 and Typo3 8.7.2 I had problems with the images. It seemed that random files (including PDFs etc.) were loaded instead of the corresponding images. I have managed to fix this by replacing 'data' => 'file:current:uid'
with 'data' => 'file:current:uid_local'
in tt_address/pi1/class.tx_ttaddress_pi1.php line 393.
Is this a bug or did I miss somthing?
As I don't know if the old issue list is still under observation, I recreate my feature request from here: https://forge.typo3.org/issues/60793.
Current line numbers to change would be 126 and 127.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.