Skip to content

fix target content not created (WP-889)#530

Merged
vsolovei-smartling merged 10 commits into
masterfrom
WP-889-translation-issues
Jun 1, 2024
Merged

fix target content not created (WP-889)#530
vsolovei-smartling merged 10 commits into
masterfrom
WP-889-translation-issues

Conversation

@vsolovei-smartling

Copy link
Copy Markdown
Contributor

No description provided.

IFS=';' read -a array <<< "${DEPENDENCIES}"; for plugin_name in "${array[@]}"; do ${WPCLI} plugin install $plugin_name --activate-network; done && \
if [ "latest" != "${ACF_PRO_VERSION}" ]; then DLINK="${DLINK}&t=${ACF_PRO_VERSION}"; fi && \
DLINK="https://connect.advancedcustomfields.com/index.php?a=download&p=pro&k=${ACFPRO_KEY}" && \
DLINK="https://smartling-connectors-storage.s3.amazonaws.com/wordpress/acf_pro/advanced-custom-fields-pro.5.11.zip" && \

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not issue related, but prevented builds in ci. The link now has an additional dynamic parameter when copied from the acf account page, and without it 403 status is returned

Comment thread inc/Smartling/Base/SmartlingCoreUploadTrait.php Outdated
{
return (int)$this->db->getRowArray("SELECT COUNT(*) cnt from $this->tableName")['cnt'];
return (int)$this->db->getRowArray(
"SELECT SUM(LENGTH(submission_ids) - LENGTH(REPLACE(submission_ids, ',', '')) + 1) cnt from $this->tableName"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤯 🫤

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As we now store the submissionIds in a comma separated string, it's possible to count submissions per db row by calculating the count of commas in a column

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we store array of values as a string? what is the data type of this column?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we store array of values as a string? what is the data type of this column?

Type is text

@vsolovei-smartling vsolovei-smartling merged commit 0e4441f into master Jun 1, 2024
@vsolovei-smartling vsolovei-smartling deleted the WP-889-translation-issues branch June 1, 2024 13:02
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

Successfully merging this pull request may close these issues.

3 participants