Search

Do I need to also initiate a Stage submodule inside DTG?

Yes. I think so.

@Nils, you were correct. git submodule update --init --recursive did the trick. Thanks!

Update: it's now working in Firefox 7 (with minor graphical interface glitches), but not in Chromium. Not a big issue in itself for me, but thought it worth mentioning.

Im using the latest dev build and its not working. When I first save, the datasource, it works. I create 3 fields with arbitrary names and it saves. When I try to rename the fields, I get the following error

`Unknown column 'field-1' in 'sym_entries_data_56'

An error occurred while attempting to execute the following query
ALTER TABLE `sym_entries_data_56` CHANGE `field-1` `namee` varchar(255) null`
[Backtrace log]

Also, there are interface glitches. The fields wont show. I tried on existing and on fresh installs, problem still occurs. Everything is up to date.

Any thoughts?

Edit: Discussion moved from Subsection Manager 2 thread.

I tried setting up the Dynamic Text Group (DTG) extension as a field in a subsection. So far, I've found that Subsection Manager and DTG works quite well. But the problem that I have encountered involves having an empty Dynamic Text Group field in an entry. This appears to break the XML and no further entries will be output.

<error>Invalid argument supplied for foreach()</error>

This appears to be a problem with the Dynamic Text Group extension. I have tracked it down to this line by printing the Exception variable in the data source grab function:

catch(Exception $e){
    print_r($e);
    $result->appendChild(new XMLElement('error', $e->getMessage()));
    return $result;
}

Which provides a backtrace (part of it shown below):

ErrorException Object
(
    [message:protected] => Invalid argument supplied for foreach()
    [string:Exception:private] => 
    [code:protected] => 0
    [file:protected] => /Users/stephen/Sites/dev/sitename/extensions/dynamictextgroup/fields/field.dynamictextgroup.php
    [line:protected] => 482
    [trace:Exception:private] => Array

I'll see if I can figure out a solution.

So, it looks like the solution to the problem is fairly simple. Don't run a foreach on anything that is not an array.

First, test whether the $data variable is an array:

if(is_array($data)) {
    foreach ($data as &$row) { if (!is_array($row)) $row = array($row); }
}

Problem solved.

Edit: A pull request has been sent.

Hey guys, I've been completely out of pocket for what's seemed like a hell of a long time, so I'm sorry there haven't been any updates or responses from me.

@Bauhaus: your pull request has been merged. Thanks for taking the time to sort it out!

I haven't looked at how this behaves with 2.3, so in the coming month+ I'll try and get this updated. In the meantime, please hold my feet to the fire with any issues/questions/requests.

Cheers everyone!

I have to say, this is fantastic.

Thank you brockpetrie for a wonderful extension. Version 1 works OK but 2.6 doesn't actually display the input text fields. I use Symphony 2.2.5. There is also a small quirk in Version 1. I'm trying to update an entry that contains a Dynamic Text Group from the front end but with no success. The result is that all fields are deleted from the group except for the one that I'm updating. Anybody have a solution to this? I've included eventually all fields from the Dynamic Text Group in my form but still the similar result. One row only will be left in the backend. This is the HTML output. Probably my syntax isn't correct but I don't know what I should change.

<input type="hidden" name="update-inventory[fields][0][options][textfield1][]" value="XXL" />
          <input type="hidden" name="update-inventory[fields][0][options][textfield2][]" value="19" />
          <input type="hidden" name="update-inventory[fields][1][options][textfield1][]" value="XL" />
          <input type="hidden" name="update-inventory[fields][1][options][textfield2][]" value="21" />
          <input type="hidden" name="update-inventory[fields][2][options][textfield1][]" value="S" />
          <input type="hidden" name="update-inventory[fields][2][options][textfield2][]" value="18" />

@brockpetrie: great to see you are back.

Would be nice to have also dynamic values available for the select-box field.

@iwyg: Thank you, and yes it would. I'm still trying to figure out how I could go about doing that— it might be beyond my knowledge. Can you describe a use case or two that'd explain how you'd like it to work?

@ovidiust: That's super strange. I just installed 2dev6 on a fresh 2.2.5 installation and it's working without a hitch. Are you sure that lib/stage/ has files? I'm willing to bet that submodules weren't initiated/updated, which would likely cause the exact problem you're having.

I don't think I got around to testing events with version 1, so I'm not surprised it's being finicky. I'll try and find some time in the next couple weeks to take a look. In the meantime, try 2.0 dev6 again, making sure to run git submodule init and git submodule update (if using git, otherwise just grab the Stage files from https://github.com/hananils/stage and throw them in the lib/stage/ directory within DTG).

Brock, in case you are about to update this extensions for 2.3, may I suggest moving away from Stage switching to the updated core Duplicators. Stage will not be updated for Symphony 2.3 – my own Date and Time and Subsection Manager extensions are going to use Duplicators as well. The event logic is quite similar so it shouldn't be too hard to move from one plugin to the other.

Nils, that's good to know— thanks for the heads up. I'll definitely follow suit.

You might take a look at the select box field that ships with symphony. It can handle both, static and dynamic values from sections.

@brockpetrie, thanks for pulling that fix in :-)

And for such a great extension!

@brockpetrie

Just forked your extension. I'm currently working on 2.3 compatibility (e.g. removed lib Stage in favor of Symphony Dublicators). Works great so far.

Will send a pull request soon.

Attachments:
Bildschirmfoto 2012-05-10 um 16.55.10.png

Thomas, that is great! One note though: I think we don't need a header and a content area for this extension because there is neither a headline nor something that needs to be collapsed. So why don't you put the fields in the li directly setting collapsible: false in the plugin call?

I'm still playing around (the destructor looks nasty without header), but I think thats the way to go. Thanks.

Ah, that might be the result of a recent change we had to implement due to performance issues with animations: the colours are no longer defined as RGBA but as HEX. Just add additional styles for that field type (Date and Time and Subsection Manager do this as well to make sure everything looks as it should). After the release on Symphony 2.3 final we can have a look on what extensions needed to add to Duplicators and see how to adjust the core styling in 2.3.1.

Would it be possible then, to make .frame self clearing without overflow: hidden ?

.frame:before, .frame:after { 
    content: ""; display: table; 
}
.frame:after { 
    clear: both; 
}
.frame { 
    zoom: 1; 
}

And are you planing to add horizontal sortables? :)

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details