Coder Social home page Coder Social logo

Comments (4)

bmack avatar bmack commented on June 16, 2024

Hey, $spConf is an array, could you please post your TypoScript as an example? Thx.

from tt_address.

tomtom-berlin avatar tomtom-berlin commented on June 16, 2024

Sorry for the late reply, I was very busy.

Thx Tom.

Here is an excerpt of the plugin config typoscript:


plugin.tx_ttaddress_pi1 {
  templatePath = fileadmin/sites/templates/tt_address/
# per default nichts ausgeben
  defaultTemplateFileName = no_ttaddress.html
  pidList = {$idAddressList}
  singleSelection = {$idContactDefault}
  singleSelection.override.data = GP:rel
# Default - dataWrap: required, trim, poss. noTrimWrap
  templates.default {
    uid.required = 1
    gender.required = 1
    first_name.required = 1
    first_name.trim = 1
    first_name.noTrimWrap = || |
    middle_name.trim = 1
    middle_name.required = 1
    last_name.trim = 1
    last_name.required = 1
    last_name.noTrimWrap = |||
    title.required = 1
    title.trim = 1
    title.noTrimWrap = || |
    email.trim = 1
    email.required = 1
    phone.trim = 1
    phone.wrap = <span class="tel">|</span>
    phone < plugin.tx_ttaddress_pi1.lib.phoneLink
    phone.required = 1
    mobile.trim = 1
    mobile.required = 1
    mobile.wrap = <span class="tel">|</span>
    www.trim = 1
    www.required = 1
    building.trim = 1
    building.required = 1
    room.trim = 1
    room.required = 1
    organization.trim = 1
    organization.required = 1
    city.trim = 1
    city.required = 1
    zip.trim = 0
    zip.required = 1
    zip.wrap = <span class="plz">|</span>
    region.required = 1
    region.trim = 1
    country.required = 1
    country.trim = 1
    image.required = 1
    fax.required = 1
    address.required = 1
    address.br = 1
    address.trim = 1
    fax.trim = 1
    subparts {
      accessplan_pdf.hasOneOf = region
      accessplan_gmap_marker.hasOneOf = company, zip, city, address
      profession.hasOneOf = country
      name.hasOneOf = title, first_name, last_name
      role.hasOneOf = middle_name
      adr.hasOneOf = zip, city, address
      location.hasOneOf = zip, city
      contact {
          innerWrap.cObject = TEXT
          innerWrap.cObject.value = {$contactText}  
          innerWrap.stdWrap.typolink {
            parameter.dataWrap.field = uid
            parameter.dataWrap.wrap = {$idContactForm}?rel=|
            parameter.data = GP:L
            parameter.intval=1
            parameter.wrap = &L=|
            extTarget =
            ATagParams = class="internal-link"
        }   
      }
    } 
  }
  # Kontakt- bzw. Anfahrt-Link erstellen
  lib.link = COA
  lib.link {
      innerWrap.cObject = TEXT
      innerWrap.cObject.value = ---kontakt---  
      innerWrap.stdWrap.typolink {
          parameter.dataWrap.field = uid
          parameter.dataWrap.wrap = {$idContactForm}?rel=|
          parameter.data = GP:L
          parameter.intval = 1
          parameter.wrap = &L=|
          extTarget =
          ATagParams = class="internal-link"
    }
  }
 # erstellt einen Telefon-Link für Browser, die das verstehen
 lib.phoneLink = COA

from tt_address.

Hawkeye1909 avatar Hawkeye1909 commented on June 16, 2024

Hi! I also came across this. The error occurs if the subpart doesn't have the 'hasOneOf' property (in Toms case this is valid for the subpart 'contact'). My solution is to change line 461 from
if ($spConf['hasOneOf'] && !$this->hasOneOf($spConf['hasOneOf'], $address)) {
to
if (isset($spConf['hasOneOf']) && !$this->hasOneOf($spConf['hasOneOf'], $address)) {
in order to check whether the property is set.

from tt_address.

BastianBalthasarBux avatar BastianBalthasarBux commented on June 16, 2024

Merged this issue to master now. Will be in next release.

from tt_address.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.