Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resave Entries deletes out existing Reflection Field values generated by Subsection Manager on Save. #10

Open
bzerangue opened this issue Oct 31, 2013 · 5 comments

Comments

@bzerangue
Copy link

Resave Entries deleting out values Reflection Field values (that are generated from Subsection Manager using the Reflection field's XSLT utility).

When I run Resave Entries, instead of saving the Reflection Field Values, it skips over those values. Or if there is existing Reflection Field values, it empties or removes those values on Save.

To test it wasn't a Reflection field issue, I manually saved a specific entry, and it saves the value as it should.

Do you know what could be causing this?

I have used Resave Entries with a Reflection field in the past with no issue.

I am running Resave Entries, version 0.2, and running Subsection Manager 3.5.1, and Symphony 2.3.3.

Here's my reflection field utility...

<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

   <xsl:template match="data">
      <data>
        <xsl:apply-templates select="entry" mode="search-audio-speaker-reflection"/>
    </data>
   </xsl:template>

   <xsl:template match="entry" mode="search-audio-speaker-reflection">

      <xsl:element name="search-audio-speaker">

        <!-- THIS VALUE IS COMING FROM A SUBSECTION MANAGER FIELD-->

        <xsl:value-of select="concat(speaker/item/first-name/text(),' ',speaker/item/last-name/text())"/>

      </xsl:element>

   </xsl:template>

</xsl:stylesheet>
@alpacaaa
Copy link
Owner

alpacaaa commented Nov 1, 2013

Sorry for the inconvenience Brian, haven't used this extension in a while.
Would you mind sharing the PHP code you're using as a callback when resaving entries?

@bzerangue
Copy link
Author

I am not using any callback php code. I am just using the default settings
of the extension
On Nov 1, 2013 5:32 AM, "Marco Sampellegrini" [email protected]
wrote:

Sorry for the inconvenience Brian, haven't used this extension in a while.
Would you mind sharing the PHP code you're using as a callback when
resaving entries?


Reply to this email directly or view it on GitHubhttps://github.com//issues/10#issuecomment-27557569
.

@alpacaaa
Copy link
Owner

alpacaaa commented Nov 1, 2013

Ok fine, I'll try to fix the issue in the next few days :)

@bzerangue
Copy link
Author

Thank you Marco!!! I really appreciate it
On Nov 1, 2013 8:19 AM, "Marco Sampellegrini" [email protected]
wrote:

Ok fine, I'll try to fix the issue in the next few days :)


Reply to this email directly or view it on GitHubhttps://github.com//issues/10#issuecomment-27564702
.

@alpacaaa
Copy link
Owner

alpacaaa commented Nov 3, 2013

I've been able to reproduce the bug, namely subsection manager isn't populating relations when loaded by reflection field. This means all the items appended to the XML by subsection manager are missing and the utility yields no result for that reason.

I can point out some references for further investigations just in case someone is willing to fix the issue (which isn't related to resave entries).

This is where the reflection field loads all the fields in a section and creates the XML: https://github.com/symphonists/reflectionfield/blob/master/extension.driver.php#L92-L98

That code calls subsection manager to generate its XML node, but no result is actually generated here: https://github.com/hananils/subsectionmanager/blob/master/fields/field.subsectionmanager.php#L676

You can see there's a little warning on top of that method, not sure if that's the cause of the problem (probably not).

Hope this helps, thanks for using resave entries!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants