plug-in CB Blogs - changes the alias of the text?

6 years 2 months ago - 6 years 2 months ago #302025 by warlocksp
Good afternoon,
Tell me please,

Question:
When a user creates a blog, everything is fine.
After editing, does the alias of the text change?

Example:
When creating it turns out: /blog/###/testirovanie-bloga
Click edit and save , it turns out: /blog/###/testirovanie-bloga-2
Each time it is alternated with "-2" or without it.

That is, "-2" is added to the alias of the text

Please Log in to join the conversation.

6 years 1 month ago #302373 by warlocksp
The answer is:
www.joomlapolis.com/forum/198-cb/238564-plug-in-cb-blogs-changes-alias-text
********************
This block of code in the file "plug_cbblogs\models\joomla25.php":
while ( $table->load( array( 'alias' => $alias, 'catid' => $article->get( 'catid' ) ) ) ) {
$matches = null;

if ( preg_match( '#-(\d+)$#', $alias, $matches ) ) {
$alias = preg_replace( '#-(\d+)$#', '-' . ( $matches[1] + 1 ). '', $alias );
} else {
$alias .= '-2';
}
}

Delete:
else {
$alias .= '-2';
}

And there will be happiness.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.163 seconds

Facebook Twitter LinkedIn