VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: Milbo on February 09, 2016, 23:44:53 PM

Title: New stable Release Candidate 3.0.13 released, please anyone test.
Post by: Milbo on February 09, 2016, 23:44:53 PM
This is a very matured release. The maintrunk is already working with the new VMF system which should help to write a bridge for Wordpress. I decided to create a new branch and to release an interims version. It has any fixes and features enhancements until 5. January. Any bug or feature related code got backported.
You should in any case make a backup of your database. The tableupdater got strongly enhanced and should handle tables with broken or missing primary fields (fields with auto_increment) a lot better. But it is due the logic of enhancement just not 1 Million times tested as the old one.

Changes from vm3.0.13.0 - vm3.0.13.4:

r9170
Paypal IPN in case payment type='cart' and payment_currency=order_currency
---------------------
r9169
Minors for vm3.0.13.4
---------------------
r9168
Updated router, works now without product suffix
---------------------
r9166
Important code adjustment for avatax  added ssl support for add to cart popup
---------------------
r9164
Backport to vm3.0.14 cache for language loading, so we can use "reload=true" Removed the , in sort keys (check product.php) removed unnecessary vmText in the list for userfield names
---------------------
r9162
- Swapped parameters for vmError messages in function getMyOrderDetails to prevent that normal users sensitive information
- fixed mod_virtuemart_product, added divs for price js and added vmJsApi::writeJS() for cached modules content (cant be cached).
---------------------
r9160
adjusted html.php for php7 http://forum.virtuemart.net/index.php?topic=133113.msg461282#msg461282
---------------------
r9159
product filter in BE should be kept in session
---------------------
r9156
fixed language loading of invoices found again something in tableupdater, added UNIQUE to the condition checking for KEYS enhanced function getMyOrderDetails, also registered users can now visit a guest order, if they enter correct order pw
---------------------
r9154
tableupdater added now that the dropPrimary is only executed if either the old, or the new definition has an auto_increment and the dropPrimary functions also removes the auto_increment from any field before. But if new and old definition h...
fixed small error in product listing, lists media 0 if no media is attached.
---------------------

Changes since vm3.0.12:
in "short":
- MV as radio
- new layout for category module
- cleaned css
- security and rights managment, (mainly already done for vm3.0.12)
- fixes for tos.php, to set it unrequired
- create Product Clone sets the clone unpublished and product_ordered, product_sales to 0
- Router has new option, to create links without CategoryName
- absolute urls for canonical
- alternative layotus for FE modules
- js validator also for shipment addresses
- Enhanced js validation of country/state combo
- max_cats_per_product
- added hidden config product.published, which determines if a new product is already published. (by default not published)
- browse page shows generic child variants
- Added perms for order editing to the model
- better and robust code for vmvalidator js
- Fix for vmuploader.php, when exif_imagetype is not supported
- added bulk set order status
- captcha only for guests
- Added that the top category uses the set metadata
- added loading of product images for invoice
- orderDetails are now accessible in order_done.php
- enhanced tableupdater, also correcting missing Primary Keys

as raw:
r9153
Enhanced again the tableupdater. Primary keys are now directly created with the new auto_increment field, and if already existing dropped. So we could even change now the Primary column. This should prevent errors that sometimes users get a...
---------------------
r9152
for vm3.0, synchro, fixed tableupdater. Can add now missing Primaries, workaround is to create the field without Auto_increment, to create the key in the blue and to alter the field for the primary after
---------------------
r9147
virtumart.cfg parser understands // inline comments
---------------------
r9146
check if translation of COM_VIRTUEMART_PLUGIN_COST_DISPLAY has actually a / and must be split Added vendor Id to coupon sample
---------------------
r9145
little fix in migrator for related products fixed sampledata, Unit was missing for the root product and so for almost any product and so the shipment weight calculation failed
Added missing language keys added back port of links without cat...
---------------------
r9144
Updated heidelpay and  added weight unit for root product of the sampledata
---------------------
r9104
add Marge rules to OrderCalcRules
---------------------
r9103
New layout for the category module, a grid of the top level categories with images like the vm frontpage.
---------------------
r9102
add marge rules to product prices
---------------------
r9101
amazon: After synchronous AmazonRejected TransactionTimeout, cancel order on Amazon side
---------------------
r9098
Removed some duplicate css rules. Corrected the .right class.
Virtuemart.updateContent function updates now also the page title tag. 
---------------------
r9097
changed more smallint to int fixed small error, in generic child, which did not check the products for shoppergroups (was loaded for BE) added prodimg_browse and catimg_browse to define how many images should be loaded for browsing more rep...
---------------------
r9096
Customer_number: adding security
---------------------
r9095
Customer number: can be changed
---------------------
r9094
small error in sublayout tos.php, was not correctly set to unrequired reverted changes for registration mail
---------------------
r9092
amazon: refund
---------------------
r9091
amazon: getallheaders
---------------------
r9090
little typo in vmsjapi, which created "Virtuemart not defined" js error
create Product Clone sets the clone unpublished and product_ordered, product_sales to 0
Router has new option, to create links without CategoryName
---------------------
r9089
Canonical: absolute URLs
---------------------
r9084
Added option for alternative layouts to FE modules (search, currencies, cart, manufacturer). 
Reformatted all module xml files for readability.
---------------------
r9083
amazon: close reference when no more authorization will be created
---------------------
r9081
Realex: handling of 501: order already processed: do not change previous order status
---------------------
r9079
mediahandler displays and keeps thumbnail override path removed accidently added vmdebug better compatibility for js vars
---------------------
r9078
js validator also for shipment addresses
---------------------
r9077
Enhanced js validation of country/state combo added KEYS for product_in_stock and product_ordered
added JResponse::sendHeaders(); before echo json_encode
---------------------
r9076
Fixed php error when product has no rating.
---------------------
r9075
Enhanced handling of tasks with . by assigning task in the constructor Added more general handling of vm js variables. added inline to the header now.
Added vmJsApi::loadPopUpLib, to reuse the code loading the popup js Added check in store ...
---------------------
r9074
Added perms for order editing to the model better and robust code for vmvalidator js
Fix for vmuploader.php, when exif_imagetype is not supported fix when joomlaAddsubmitbutton was used twice
Added max cats per product for vendors  required...
---------------------
r9072
amazon: CaptureNotification: do not sen email to customer OrderReferenceNotification : get  reason code and update order language file: replacing "  by "_QQ_"
---------------------
r9071
countries codes / names fixes
---------------------
r9070
Correcting typo in BE en-GB.com_virtuemart.ini
---------------------
r9069
Changed a language string again in BE en-GB.com_virtuemart.ini and de-DE.com_virtuemart.ini
---------------------
r9068
Update of BE en-GB.com_virtuemart.ini and en-GB.com_virtuemart_config.ini plus corresponding de-DE files
---------------------
r9067
captcha only for guests
---------------------
r9065
amazon: fix for  ipn url when live and admin= https
---------------------
r9063
Added variable for active joomla language count  changed JPaginationObject in VmPagination to vPaginationObject Added fallback in media uploader for servers without exif_imagetype enhanced storing of calculation rules in orders added order ...
---------------------
r9061
amazon email fixes, countries => multiple
---------------------
r9059
amazon DE language file: wrong '
---------------------


by Alatak, JJK, kkmediaproduction, Milbo, and yourgeek
http://dev.virtuemart.net/attachments/download/991/com_virtuemart.3.0.13.4_extract_first.zip
http://dev.virtuemart.net/attachments/download/988/VirtueMart3.0.13_Joomla_2.5.29-Stable-Full_Package.zip
Title: Re: New stable Release Candidate 3.0.13 released, please anyone test.
Post by: sandomatyas on February 10, 2016, 07:39:45 AM
Great imrovements :)
Some notices after few minutes in the BE:
But great job indeed :)
Title: Re: New stable Release Candidate 3.0.13 released, please anyone test.
Post by: Milbo on February 10, 2016, 10:26:59 AM
Quote from: sandomatyas on February 10, 2016, 07:39:45 AM
After installing the component I got this message: Incorrect table definition; there can be only one auto column and it must be defined as a key SQL=ALTER TABLE `vm3_virtuemart_calcs` DROP PRIMARY KEY;
Hmm, I worked exactly on that. It seems you had the case, that the system meant to drop the Primary, while an auto_increment is still defined. In case you did a db backup it would be very good to have your table definition, before the update.

Quote from: sandomatyas on February 10, 2016, 07:39:45 AM
There is a pagination on the bottom of the list views but the limit box is missing: http://i.imgur.com/3MPvcx7.png
I am sorry, but I do not understand, what you mean. The list box is missing in j3 in general. It is an unresolved bug.

Quote from: sandomatyas on February 10, 2016, 07:39:45 AM
If I filter the products on the BE and do something with a product (publish, delete, etc) the filter is empty again: http://screencast.com/t/Ve00bRnilItP
Interesting question if we want to keep the filter, after execution of a task.

Quote from: sandomatyas on February 10, 2016, 07:39:45 AM
The product list view displays 1 media if I haven't upload any
yeh and when you click on it, you end up in an empty list, thank you for this observation.

Quote from: sandomatyas on February 10, 2016, 07:39:45 AM
Most of my partners wants to see the final price in the product list views instead of the base price. I don't know if it is possible
That is definitly possible and a normal forum question (templating/price building)
Title: Re: New stable Release Candidate 3.0.13 released, please anyone test.
Post by: VMTemplates.net on February 10, 2016, 10:49:45 AM
Quote from: sandomatyas on February 10, 2016, 07:39:45 AM
After installing the component I got this message: Incorrect table definition; there can be only one auto column and it must be defined as a key SQL=ALTER TABLE `vm3_virtuemart_calcs` DROP PRIMARY KEY;
I'm getting the same issue on a number of an installation
Title: Re: New stable Release Candidate 3.0.13 released, please anyone test.
Post by: sandomatyas on February 10, 2016, 11:06:11 AM
Thanks.
About the limit box:
If I check some core compontent list I can select how many items I want to display per page. Like Joomla plugin list: http://i.imgur.com/XDsDiGH.png
But there isn't a dropdown like this in VM
Title: Re: New stable Release Candidate 3.0.13 released, please anyone test.
Post by: Milbo on February 10, 2016, 12:02:22 PM
Quote from: VMTemplates.net on February 10, 2016, 10:49:45 AM
Quote from: sandomatyas on February 10, 2016, 07:39:45 AM
After installing the component I got this message: Incorrect table definition; there can be only one auto column and it must be defined as a key SQL=ALTER TABLE `vm3_virtuemart_calcs` DROP PRIMARY KEY;
I'm getting the same issue on a number of an installation

I found the problem. As I explained, I enhanced the tableupdater, but missed the case, when both fields are auto_increment and only the field definition itself has changed. In our case it is from smallint to int.

I added now that the dropPrimary is only executed if either the old, or the new definition has an auto_increment and the dropPrimary functions also removes the auto_increment from any field before. But if new and old definition have an autoincrement attribute, then the primary key is untouched.

Btw, uploaded the new version
Title: Re: New stable Release Candidate 3.0.13 released, please anyone test.
Post by: Milbo on February 10, 2016, 12:04:56 PM
Quote from: sandomatyas on February 10, 2016, 11:06:11 AM
Thanks.
About the limit box:
If I check some core compontent list I can select how many items I want to display per page. Like Joomla plugin list: http://i.imgur.com/XDsDiGH.png
But there isn't a dropdown like this in VM

Yepp, but that is atm not solved in general and not part of the feature/bug list.
Title: Re: New stable Release Candidate 3.0.13 released, please anyone test.
Post by: lindapowers on February 10, 2016, 12:15:08 PM
Quote from: Milbo on February 10, 2016, 12:04:56 PM
Quote from: sandomatyas on February 10, 2016, 11:06:11 AM
Thanks.
About the limit box:
If I check some core compontent list I can select how many items I want to display per page. Like Joomla plugin list: http://i.imgur.com/XDsDiGH.png
But there isn't a dropdown like this in VM

Yepp, but that is atm not solved in general and not part of the feature/bug list.

This works in core joomla, in every section and in every component, you have it in the user list at top right, in the article manager etc and is working also in components for VM like CSVIpro or vmrewardpoints.

So yes is not solved in vm but no is not a bug in joomla and not missing there sorry.
Title: Re: New stable Release Candidate 3.0.13 released, please anyone test.
Post by: franayala on February 10, 2016, 12:22:51 PM
This was reported and not fixed ages ago  >:(

Title: Re: New stable Release Candidate 3.0.13 released, please anyone test.
Post by: Milbo on February 10, 2016, 12:41:04 PM
It is for whatever reason not compatible with the old one and seen as minor problem. You can still change the general listing. It is not a new bug, nor part of the list, that is all what I said. So I was looking for a new problem. I  take a look for vm3.0.14. I think anyway it is more a template problem.

Btw, product listing should show now 0 media
Title: Re: New stable Release Candidate 3.0.13 released, please anyone test.
Post by: franayala on February 10, 2016, 13:13:14 PM
template issue? we all use ISIS and this only fails in VM

?!?!?
Title: Re: New stable Release Candidate 3.0.13 released, please anyone test.
Post by: franayala on February 10, 2016, 13:15:58 PM
and the button for reordering categories doesn't work either, you have to order them manually, in general every ordering function is not working :(
Title: Re: New stable Release Candidate 3.0.13 released, please anyone test.
Post by: Milbo on February 10, 2016, 14:28:59 PM
Quote from: franayala on February 10, 2016, 13:13:14 PM
template issue? we all use ISIS and this only fails in VM

?!?!?

I just checked it again. It is definitly a template issue! If you use the ISIS template, then it uses for the list footer an override function, which does NOT show the limitlist. Instead they show the limitlist on the top.

So we could provide overrides, which also have an additional display of the limitbox on top. Or we add the limitlist on top in general, but then the top box would be overwritten by the bottom box and we would need a js, else people complain that they change the topbox without result. Disabling, or displaying the box if it is joomla 3 would create problems on templates without the override and are not clean.

We could also use always the ISIS method, also in j2.5. It would mean that we have to change any layout, just because ISIS did an override. Somehow all of this is silly.

You can test this yourself, just disabling the override of the ISIS template /administrator/templates/isis/html/pagination.php
Title: Re: New stable Release Candidate 3.0.13 released, please anyone test.
Post by: Milbo on February 10, 2016, 14:30:19 PM
Quote from: franayala on February 10, 2016, 13:15:58 PM
and the button for reordering categories doesn't work either, you have to order them manually, in general every ordering function is not working :(

I cannot confirm.
Title: Re: New stable Release Candidate 3.0.13 released, please anyone test.
Post by: sandomatyas on February 10, 2016, 14:50:30 PM
it works for me
Title: Re: New stable Release Candidate 3.0.13 released, please anyone test.
Post by: franayala on February 10, 2016, 16:18:37 PM
Ok.

I understand but why does this work in every other component in joomla except in virtuemart?

If i disable the override all is working but i don't understand why this is a problem for you and not for other developers.

In fact, for me it is the same thing to have at top or bottom the controls and buttons, but working. If the problem is to have at top the buttons and for this reason this features is not working... this thing is the really silly thing.

Thanks
Title: Re: New stable Release Candidate 3.0.13 released, please anyone test.
Post by: noras on February 11, 2016, 08:56:49 AM
@Milbo - I have a solution for you :)
For administrator\components\com_virtuemart\views\product\tmpl\default.php line 228 to 230:
<td colspan="16">
<?php echo $this->pagination->getListFooter(); ?>
</td>

Change to:

<td colspan="16">
            <?php echo $this->pagination->getLimitBox(); ?>
<?php echo $this->pagination->getListFooter(); ?>
</td>


It does not look pretty but it works - you need to add some HTML and CSS and can be beautiful.

(http://sulzycki.com.pl/images/vm3_pagination.png)

EDIT:
You can even give a condition, because this code works unless only for J3.

And of course the administrator\components\com_virtuemart\views\category\tmpl\default.php also need to make changes.
Title: Re: New stable Release Candidate 3.0.13 released, please anyone test.
Post by: bettinz on February 11, 2016, 09:14:27 AM
Hello, in /components/com_virtuemart/views/cart/tmpl
line 23 and 24
echo '<a class="continue_link" href="' . $this->continue_link . '" >' . vmText::_('COM_VIRTUEMART_CONTINUE_SHOPPING') . '</a>';
echo '<a class="showcart floatright" href="' . $this->cart_link . '">' . vmText::_('COM_VIRTUEMART_CART_SHOW') . '</a>';

doesn't return a SEF url but the index.php?option=com_virtuemart&view=cart

It's a minor bug, but is what I've found so far ;)
Title: Re: New stable Release Candidate 3.0.13 released, please anyone test.
Post by: noras on February 11, 2016, 09:25:36 AM
The improvement is still in the file administrator\components\com_virtuemart\views\product\tmpl\product_edit_information.php line ~43-45:
<td>
<input class="required inputbox" type="text" name="product_name" id="product_name" value="<?php echo $this->product->product_name?>" size="32" maxlength="255" />
</td>

Change to:
<td>
<input class="required inputbox" type="text" name="product_name" id="product_name" value="<?php echo htmlspecialchars($this->product->product_name); ?>" size="32" maxlength="255" />
</td>

Solve the problem of character display: ". ', [,]{,},<,>
The problem concerns the input element when the title product is the sign of an inch(char: "), is the re-editing does not display the title of the product.

The same file lines ~53-55:
<td height="18">
<input type="text" class="inputbox"  name="slug" id="slug" value="<?php echo $this->product->slug?>" size="32" maxlength="255" />
</td>

Change to:
<td height="18">
<input type="text" class="inputbox"  name="slug" id="slug" value="<?php echo htmlspecialchars($this->product->slug); ?>" size="32" maxlength="255" />
</td>
Title: Re: New stable Release Candidate 3.0.13 released, please anyone test.
Post by: Ghost on February 11, 2016, 09:29:26 AM
Quote from: Milbo on February 10, 2016, 10:26:59 AM
Quote from: sandomatyas on February 10, 2016, 07:39:45 AM
If I filter the products on the BE and do something with a product (publish, delete, etc) the filter is empty again: http://screencast.com/t/Ve00bRnilItP
Interesting question if we want to keep the filter, after execution of a task.
Absolutely. It is extremely important for UX. All Joomla core components do it for this reason.
Title: Re: New stable Release Candidate 3.0.13 released, please anyone test.
Post by: Ghost on February 11, 2016, 10:11:15 AM
I don't know if it's a bug or a "feature" but disabling seo_full causes the same category appear twice on category URLs, e.g.:

example.com/shop/wear/wear
example.com/shop/mister/wear/mister
Title: Re: New stable Release Candidate 3.0.13 released, please anyone test.
Post by: Milbo on February 11, 2016, 13:29:49 PM
Quote from: bettinz on February 11, 2016, 09:14:27 AM
Hello, in /components/com_virtuemart/views/cart/tmpl
line 23 and 24
echo '<a class="continue_link" href="' . $this->continue_link . '" >' . vmText::_('COM_VIRTUEMART_CONTINUE_SHOPPING') . '</a>';
echo '<a class="showcart floatright" href="' . $this->cart_link . '">' . vmText::_('COM_VIRTUEMART_CART_SHOW') . '</a>';

doesn't return a SEF url but the index.php?option=com_virtuemart&view=cart

It's a minor bug, but is what I've found so far ;)
This is not a bug, that is intended! http://forum.virtuemart.net/index.php?topic=131871.msg457005#msg457005

Quote from: noras on February 11, 2016, 08:56:49 AM
@Milbo - I have a solution for you :)
I know that, I did this already. The problem is that the exception must be written for Isis template, not j3. It makes sense to have the listing on top and it would be solved already, when it would be written for j3, but it is written for ISIS, so if you switch to hathor, the problem maybe already solved. I know there are templaters who wrote great Backend templaters and they would be broken. Nasty thing.

The other thing with the encoding is not so simple, I know that it looks right then, but can create other problems, when you store a product with minor rights.

Thank you Ghost.
Title: Re: New stable Release Candidate 3.0.13 released, please anyone test.
Post by: noras on February 11, 2016, 13:59:37 PM
@Milbo, You have to remember that the default template J3 is Isis, so 99% of the population uses it. You should not be responsible for other templates, if the other components of the change in the number of records on the back running in a VM should be done under the template Isis. It is important for vendors to not have to enter every moment configuration.

Title: Re: New stable Release Candidate 3.0.13 released, please anyone test.
Post by: claesbas on February 11, 2016, 15:16:36 PM
We used a server with PHP7 and Joomla 3.5. BETA2 and had problems in backend (no dropdowns in configurations). Here is a fix:

administrator/components/com_virtuemart/helpers/html.php

Line no 383 and 384

$key = $options['option.key'] === null ? $elementKey : $element->$options['option.key'];
$text = $element->$options['option.text'];


This two lines changed to

$key = $options['option.key'] === null ? $elementKey : $element->{$options['option.key']};
$text = $element->{$options['option.text']};



These missing { } is on many places so it would be good to go through the code for that and fix them all. This was just to get the dropdowns working in Configuration of Virtuemart.
Title: Re: New stable Release Candidate 3.0.13 released, please anyone test.
Post by: Milbo on February 11, 2016, 22:44:26 PM
Quote from: noras on February 11, 2016, 13:59:37 PM
@Milbo, You have to remember that the default template J3 is Isis, so 99% of the population uses it. You should not be responsible for other templates,
The problem is that it is done as override of the pagination box, which just removes the listing. But on the other hand it wont hurt, when j2.5 people get the new layout. I see, when I have time todo it, or someone else does it, actually a simple, but boring job.

Btw, new direct link, with fixes due the hint of claesbas and some more, language for invoices, js for product modules. and so on.
http://dev.virtuemart.net/attachments/download/989/com_virtuemart.3.0.13.2_extract_first.zip
Title: Re: New stable Release Candidate 3.0.13 released, please anyone test.
Post by: claesbas on February 12, 2016, 09:13:33 AM
Ok on our testing site running on a Nginx server with PHP7 and Joomla 3.5 BETA 2 we have some problems:

We get error in VirtueMart  when we try to go to category and product detail. VM Frontpage works.

After removed some lines from below file, both page works well.

File Name     : libraries/joomla/document/renderer/html/head.php
Error details : Argument 1 passed to Joomla\Utilities\ArrayHelper::toString() must be of the type array, string given, called in /var/www/clients/client1/web35/web/libraries/joomla/document/renderer/html/head.php on line 119


Line no 115 to 120

// Generate link declarations
foreach ($document->_links as $link => $linkAtrr)
{
$buffer .= $tab . '<link href="' . $link . '" ' . $linkAtrr['relType'] . '="' . $linkAtrr['relation'] . '"';

if ($temp = ArrayHelper::toString($linkAtrr['attribs']))
{
$buffer .= ' ' . $temp;
}

$buffer .= ' />' . $lnEnd;
}


What can this be. I posted it to GitHub Joomla too. Is this a Virtuemart issue or is this a Joomla problem?
Title: Re: New stable Release Candidate 3.0.13 released, please anyone test.
Post by: claesbas on February 12, 2016, 11:19:08 AM
Quote from: claesbas on February 12, 2016, 09:13:33 AM
Ok on our testing site running on a Nginx server with PHP7 and Joomla 3.5 BETA 2 we have some problems:

We get error in VirtueMart  when we try to go to category and product detail. VM Frontpage works.

After removed some lines from below file, both page works well.

File Name     : libraries/joomla/document/renderer/html/head.php
Error details : Argument 1 passed to Joomla\Utilities\ArrayHelper::toString() must be of the type array, string given, called in /var/www/clients/client1/web35/web/libraries/joomla/document/renderer/html/head.php on line 119


Line no 115 to 120

// Generate link declarations
foreach ($document->_links as $link => $linkAtrr)
{
$buffer .= $tab . '<link href="' . $link . '" ' . $linkAtrr['relType'] . '="' . $linkAtrr['relation'] . '"';

if ($temp = ArrayHelper::toString($linkAtrr['attribs']))
{
$buffer .= ' ' . $temp;
}

$buffer .= ' />' . $lnEnd;
}


What can this be. I posted it to GitHub Joomla too. Is this a Virtuemart issue or is this a Joomla problem?

This is fixed in latest version on GitHub (date 2016-02-12) - Download libraries/joomla/document/renderer/html/head.php from Joomla github for your Joomla 3.5 BETA to get it to work.

https://github.com/joomla/joomla-cms/blob/staging/libraries/joomla/document/renderer/html/head.php (https://github.com/joomla/joomla-cms/blob/staging/libraries/joomla/document/renderer/html/head.php)
Title: Re: New stable Release Candidate 3.0.13 released, please anyone test.
Post by: noras on February 12, 2016, 14:30:07 PM
@Milbo - I found a small bug with languages. GIF below illustrates the problem.
The problem appeared in version VM3.0.13.2.

(http://sulzycki.com.pl/images/vm3_language_problem.gif)
Title: Re: New stable Release Candidate 3.0.13 released, please anyone test.
Post by: Ghost on February 12, 2016, 14:56:44 PM
Duplicate category URL issue is caused in getCategoryNames function here:

if($this->full) {
$parent_ids = array_reverse($parent_ids) ;
} else if(isset($parent_ids[0])){
$t = $parent_ids[0];
$parent_ids[] = $t;
}


Leaving only $parent_ids = array_reverse($parent_ids) ; line fixes the URLs. So far hasn't broken anything for me.

I know you've been asked a lot about removing SEO suffix and there is a fix which seems to work well http://blog.codepyro.com/2014/02/virtuemart-2-how-to-remove-seo-suffix.html. Maybe need extra testing but so far it works good on my test site.

Attached the router.php in case anyone wants to try it out.
Title: Re: New stable Release Candidate 3.0.13 released, please anyone test.
Post by: Milbo on February 14, 2016, 11:14:02 AM
From my point of view, you just disabled the "full category branch in URL" option. Can you tell me where I can find the duplicates in the sampledata? Using the fullinstaller?

The problem with the suffix is, that you must know that you must not have the same product and category name.

And as the guy says himself: "updated 3.14.14 - I didn't realize that the site I had made these adjustments to all of the categories were set as menu items which of course makes a big difference. Anyway the zip file has been updated with the latest router."
Title: Re: New stable Release Candidate 3.0.13 released, please anyone test.
Post by: Ghost on February 14, 2016, 12:56:10 PM
Quote from: Milbo on February 14, 2016, 11:14:02 AM
From my point of view, you just disabled the "full category branch in URL" option. Can you tell me where I can find the duplicates in the sampledata? Using the fullinstaller?

I don't mean there is duplicate sample data, I mean there are duplicate category names in URLs. This happens when "Use full category tree for product links" option is disabled. Then every top level category URL looks like this: category-name/category-name and every child category looks like this: category-name/parent-category-name/category-name.

Quote from: Milbo on February 14, 2016, 11:14:02 AM
The problem with the suffix is, that you must know that you must not have the same product and category name.
It is true, yes. But it's a similar limitation to current where you can't have SEO suffix in category alias.

Quote from: Milbo on February 14, 2016, 11:14:02 AM
And as the guy says himself: "updated 3.14.14 - I didn't realize that the site I had made these adjustments to all of the categories were set as menu items which of course makes a big difference. Anyway the zip file has been updated with the latest router."
Like he said, it was updated to not require category menu items anymore. Also his router was from VM2. the router I uploaded is from VM 3.0.13.2 with his modifications applied.

Also I just found another issue in original unmodified router when "Use full category tree for product links" option is disabled. Itemid is not set properly for product details which causes current Itemid to be added (e.g. /cart/product-name when in cart view if there is a cart menu item) or basic URLs like this: /component/virtuemart/product-name in some cases. To reproduce, add product to cart, go to cart page and check product links in cart.

Also limitstart and limit are added to canonical of product details page on a few sites for some reason. These could be explicitly unset in productdetails since they're not used at all?

I have uploaded my latest router. Please test anyone.
Title: Re: New stable Release Candidate 3.0.13 released, please anyone test.
Post by: Ghost on February 15, 2016, 09:48:12 AM
Here is an dea to fix product breadcrumbs and back to category button when seo_full is disabled. It is based on last visited category which VM already saves in session.

After this line in productdetails view.html.php // Load the category
$category_model = VmModel::getModel('category');
add this:

$seo_full = VmConfig::get('seo_full',true);

if(in_array($last_category_id,$product->categories) && !$seo_full) $product->virtuemart_category_id = $last_category_id;


and after $category = $category_model->getCategory($product->virtuemart_category_id);

add this: if(in_array($last_category_id,$product->categories) && !$seo_full) $product->category_name = $category->category_name;

To me works as expected but please test and review anyone.
Title: Re: New stable Release Candidate 3.0.13 released, please anyone test.
Post by: Studio 42 on February 15, 2016, 17:31:08 PM
As this can be a great idea to remove the suffix in URL. This is not needed.
YOu can use ".htm" to have good SEO and disable suffix in Joomla
And removing it, need more work to find out if this is a category or a product. And all old VM website loose all they current links in search engines and you have then to add a redirect rule.
Title: Re: New stable Release Candidate 3.0.13 released, please anyone test.
Post by: Ghost on February 16, 2016, 11:36:02 AM
Quote from: Studio 42 on February 15, 2016, 17:31:08 PM
As this can be a great idea to remove the suffix in URL. This is not needed.
YOu can use ".htm" to have good SEO and disable suffix in Joomla
And removing it, need more work to find out if this is a category or a product. And all old VM website loose all they current links in search engines and you have then to add a redirect rule.
It is needed, many users have requested this. "You can do A" when you need to do B is not the solution. And the idea was that removing suffix is optional. Users who do not remove it still have their URLs working with suffix.

Anyways, Max already took his time to add this and make it even better! See here http://dev.virtuemart.net/projects/virtuemart/activity. Test if you can.
Title: Re: New stable Release Candidate 3.0.13 released, please anyone test.
Post by: Studio 42 on February 16, 2016, 12:01:12 PM
I know you can do it, but the problem was possible conflit with categories, so whe have add the suffix on the begin of first vm2 releases.
The problem was the same with missing Menu, some don't understand why you have components/com_virtuemart at the place of sef link. So we have add for some year the message when this was not set, but this problem is for all Joomla component, so i hope that you have not to many complain from user because they cannot access to a product with sef active.
Title: Re: New stable Release Candidate 3.0.13 released, please anyone test.
Post by: noras on February 18, 2016, 10:45:11 AM
@Milbo - thanks, VM3.0.13.4 solves the problem with the installation of the language.
Title: Re: New stable Release Candidate 3.0.13 released, please anyone test.
Post by: Milbo on February 18, 2016, 17:33:14 PM
Please vote http://forum.virtuemart.net/index.php?topic=133216.0
Title: Re: New stable Release Candidate 3.0.13 released, please anyone test.
Post by: noras on February 26, 2016, 10:31:43 AM
I have a suggestion to improve the function prepareContinueLink(). This will improve the SEF url in a modal window that appears when you add a product to the cart.

So it is now
index.php?option=com_virtuemart&view=cart&lang=en
It seems to me that it would be better if the link is
shop/mycart

In file components\com_virtuemart\helpers\vmview.php for function prepareContinueLink(), line ~114-145, is now:

function prepareContinueLink(){

$virtuemart_category_id = shopFunctionsF::getLastVisitedCategoryId ();
$categoryStr = '';
if ($virtuemart_category_id) {
$categoryStr = '&virtuemart_category_id=' . $virtuemart_category_id;
}

$ItemidStr = '';
$Itemid = shopFunctionsF::getLastVisitedItemId();
if(!empty($Itemid)){
$ItemidStr = '&Itemid='.$Itemid;
}

$lang = '';
if(VmConfig::$jLangCount>1 and !empty(VmConfig::$vmlangSef)){
$lang = '&lang='.VmConfig::$vmlangSef;
}

$this->continue_link = JURI::root() .'index.php?option=com_virtuemart&view=category' . $categoryStr.$lang.$ItemidStr;
$this->continue_link_html = '<a class="continue_link" href="' . $this->continue_link . '">' . vmText::_ ('COM_VIRTUEMART_CONTINUE_SHOPPING') . '</a>';

$juri = JUri::getInstance()->toString(array( 'host', 'port'));

$scheme = 'http';
if(VmConfig::get('useSSL',false)){
$scheme .='s';
}
$this->cart_link = $scheme.'://'.$juri. JURI::root(true).'/index.php?option=com_virtuemart&view=cart'.$lang;

return;
}


Change it:


function prepareContinueLink(){

$virtuemart_category_id = shopFunctionsF::getLastVisitedCategoryId ();
$categoryStr = '';
if ($virtuemart_category_id) {
$categoryStr = '&virtuemart_category_id=' . $virtuemart_category_id;
}

$ItemidStr = '';
$Itemid = shopFunctionsF::getLastVisitedItemId();
if(!empty($Itemid)){
$ItemidStr = '&Itemid='.$Itemid;
}

$lang = '';
if(VmConfig::$jLangCount>1 and !empty(VmConfig::$vmlangSef)){
$lang = '&lang='.VmConfig::$vmlangSef;
}

$this->continue_link =  JRoute::_('index.php?option=com_virtuemart&view=category' . $categoryStr.$lang.$ItemidStr);
$this->continue_link_html = '<a class="continue_link" href="' . $this->continue_link . '">' . vmText::_ ('COM_VIRTUEMART_CONTINUE_SHOPPING') . '</a>';
$this->cart_link = JRoute::_('index.php?option=com_virtuemart&view=cart'.$lang);

return;
}



Edit: Spelling correction.
Title: Re: New stable Release Candidate 3.0.13 released, please anyone test.
Post by: Ghost on February 26, 2016, 10:44:35 AM
http://virtuemart.net/news/latest-news/472-release-of-3-0-10

Popup links were made not SEF in VM 3.0.10 because there was a language detection issue. And your code seems to have that issue as well.
Title: Re: New stable Release Candidate 3.0.13 released, please anyone test.
Post by: noras on February 26, 2016, 11:31:36 AM
Quote from: Ghost on February 26, 2016, 10:44:35 AM
http://virtuemart.net/news/latest-news/472-release-of-3-0-10

Popup links were made not SEF in VM 3.0.10 because there was a language detection issue. And your code seems to have that issue as well.

Okay, I understand. And you can not simply be added  JLanguageMultilang::isEnabled() for the condition of the language?

function prepareContinueLink(){

$virtuemart_category_id = shopFunctionsF::getLastVisitedCategoryId ();
$categoryStr = '';
if ($virtuemart_category_id) {
$categoryStr = '&virtuemart_category_id=' . $virtuemart_category_id;
}

$ItemidStr = '';
$Itemid = shopFunctionsF::getLastVisitedItemId();
if(!empty($Itemid)){
$ItemidStr = '&Itemid='.$Itemid;
}

$lang = '';
if(VmConfig::$jLangCount>1 and !empty(VmConfig::$vmlangSef) && JLanguageMultilang::isEnabled()){
$lang = '&lang='.VmConfig::$vmlangSef;

        }

$this->continue_link =  JRoute::_('index.php?option=com_virtuemart&view=category' . $categoryStr.$lang.$ItemidStr);
$this->continue_link_html = '<a class="continue_link" href="' . $this->continue_link . '">' . vmText::_ ('COM_VIRTUEMART_CONTINUE_SHOPPING') . '</a>';
$this->cart_link = JRoute::_('index.php?option=com_virtuemart&view=cart'.$lang);

return;
}

It does not solve the problem?
Title: Re: New stable Release Candidate 3.0.13 released, please anyone test.
Post by: Studio 42 on February 26, 2016, 12:46:42 PM
YOur sef problem is already in old release.
Many want full sef links in modal cart, but only team can changes the code.
Title: Re: New stable Release Candidate 3.0.13 released, please anyone test.
Post by: Ghost on February 26, 2016, 12:48:19 PM
Quote from: noras on February 26, 2016, 11:31:36 AM
It does not solve the problem?
Testing on live site it works on most pages (category, product, non-VM pages) except in VM frontpage.
Title: Re: New stable Release Candidate 3.0.13 released, please anyone test.
Post by: noras on February 26, 2016, 13:29:02 PM
I answer only solution, it seems to me that good. I noticed a problem in the shop my client. I fixed, it looks like it works so I shared in the forum.

Title: Re: New stable Release Candidate 3.0.13 released, please anyone test.
Post by: Alexanderz on May 31, 2016, 14:05:34 PM
I noticed that they released a new 3.0.17 release. Where you can view the changelog?
There is a section in the forum where specifically describes the new version is released?

Thank you!
Title: Re: New stable Release Candidate 3.0.13 released, please anyone test.
Post by: jenkinhill on May 31, 2016, 15:14:57 PM
It is an odd numbered version, so for testing by experienced users. Generally even number versions are the stable ones.

You can see the changes/fixes in http://dev.virtuemart.net/projects/virtuemart/repository