Drupal 7 rewrite is removing get parameters from query string - php

I've recently upgraded a site to the latest release of Drupal 7. The site has a view that retrieves a url with query string parameters from the database and then uses the Drupal rewrite functionality to add a class to the link like so:
<a class="purple-button pull-right" href="[field_database_link-url]" target="_blank">View</a>
The issue is, since the upgrade the rewrite now removes the query string parameters. If I modify the view to display a simple link the parameters are there and it works fine. However, the rewrite applies styling to present a button rather than a simple link. I can't find any settings to resolve the issue so I suspect the upgrade overwrote a modification to the Drupal core made by the original developer of the site. Any idea how I can address this issue?

It turns out that there was a bug in the latest release that in /modules/contrib/link/link.module that was causing the query strings to be stripped from the url in the token. I replaced the code in this file with the code from the pre-upgrade version and it began behaving as expected again. This, of course, is not a resolution to the issue, but at least the source of the problem has been identified. For more info: https://www.drupal.org/node/2367069
I later found that there is a patch for this issue in the dev version (7.x-1.x-dev) of this module available here: https://www.drupal.org/project/link. Download this module and replace it in your install and you should be all set.

Related

How to find out malicious code in Php (codeigniter ) website and remove those Malware?

I am working on project on localhost (not live yet) which is built in php using codeigniter framework, recently it start showing warning message which might due to malicious code injected in website, I tried all solution like checked my index.php, .htaccess and other plugins but nothing worked for me, I have followed some blogs also how to remove malware from site but that also didn't work, so my question is how to figure out in which file, in which line malicious code is injected and how to remove using any plugin or offline tool.
some links which I followed:
https://www.globalsign.com/en-in/blog/how-to-find-malware
https://dzone.com/articles/what-is-deceptive-site-ahead-warning-in-chrome-and
I was having the same issue couple of weeks before.
I noticed that wp has been installed automatically in my CI. Then i try to find from where it's calling. Then i found something in my libraries that i installed.
Firstly i remove all that calls and then remove one by one wp files
Note: Don't forget to check your htaccess files.
That was my case you might have same. Else you can search.

Update Joomla from 2.5.28 to 3.4.0

I need to update my joomla website which current version is 2.5.28. Now I'm trying to update it using this:
I use XAMPP as a server environment (PHP 5.4, MySQL 5.6)
Use a backup of my site
Also use astable version of joomla 2.5.28
I tried to update with both sites, the stable one and my one, but every time I get errors.
If I want to update my site I do this:
check for updates and update all things but for the JSN air template
go to joomla update, click on options on the right side and choose short time support, save and close
click update button
With the stable site I nearly do the same:
go to joomla update, click on options on the right side and choose short time support, save and close
click update button
I said above that I get errors. If I want to update the stable one I get these results/errors:
after updating it completely (100%) I get a white page with an url like "http://localhost/stable/administrator/index.php?option=com_joomlaupdate&task=update.finalise"
if I reload the page after getting the white page I get an error like "Can't DROP 'usertype'; check that column/key exists SQL=ALTER TABLE bcyqr_users DROP KEY usertype;"
if I reload the page again I get an error like "Table 'stable.bcyqr_postinstall_messages' doesn't exist SQL=SHOW FULL COLUMNS FROM bcyqr_postinstall_messages"
I looked in the database and I have a column with name "usertype". What happened? Why it can't be deleted?
I think it's strange that it doesn't function with the normal joomla settings. On youtube I saw videos in which the people just did the steps I also did.
And with my site I get the following errors:
18 times: Use of undefined constant DS - assumed 'DS' in C:\xampp\htdocs\mysite\administrator\components\com_poweradmin\defines.poweradmin.php
1 time: Class 'JSNConfigHelper' not found in C:\xampp\htdocs\mysite\plugins\system\jsnpoweradmin\jsnpoweradmin.php
I googled that error, so I used this extension:
http://digitaldisseny.com/en/joomla-extensions/solve-undefined-ds-constant-joomla-3-error
But then I couldn't update the joomla. I get a popup dialog with message "Invalid login".
I don't know what to do to update the joomla. Can you help me? What I do wrong?
Thanks.
Joomla 2.5 to Joomla 3 is a mini-migration, despite the fact that Joomla officially labels it as an update. We have migrated many sites from 2.5 to 3 and never were we able to update the site from within Joomla.
What we do is that we create a fresh copy of the latest version of Joomla, and then migrate the data there from 2.5.
I found this alternative guide which worked for me. I had tried the official and various other guides but this seemed useful
It claims
The following method avoids the pitfalls that occur due to third party extensions
It apparently works by bypassing the files of extensions and prevents them from interfering with the population of the database changes.

symfony 2 slashes at end of url

I am starting to work with Symfony2 and so far I like the Framework very much. I only got one problem, all URLs get a slash added at the end after every link click.
Example:
I am on: http://symblog.dev/app_dev.php
now the home button points to http://symblog.dev/app_dev.php/
when i click it I am on: http://symblog.dev/app_dev.php/
and there is another slash at the end of the home URL, so it is now: http://symblog.dev/app_dev.php//
this keeps going as often as I click the button, what causes things like the debug toolbar to crash because the ajax url does not match with multiple slashes etc. It occurs on every URL on the site not just the debug toolbar ajax.
I hope someone got an idea what the problem might be.
Environment
vagrant debian 7 vm
apache2, php 5.5, OPcache, hhvm
mysql 5.5
code lies in a shared folder with all permissions, host system is win 8.1
Screenshot: http://picload.org/image/cgardll/screenshot2014-08-2320.14.47.png
// please excuse misspellings etc. since i don't speak english natively
I'de recommend reading the documentation on routing for symfony2:
http://symfony.com/doc/current/book/routing.html
This should give you a good idea of how the routing in the framework works so you don't run into this issue in the future.
Hope this was helpful.
EDIT:
Take a look at this as well
http://blog.christian-baer.com/index.php/trailing-slash-in-symfony-route/

Joomla Admin Side URL Changed from `&` to `&` in URL String [duplicate]

I'm working on my localhost and on a system where all administrator URL's which contain a &, & is changed to & and that in turn breaks the system.
What setting is doing this? What do I need to disable? My localhost is PHP 5.3. I have to mention that other Joomla system's are working perfectly fine and the & in the url are not converted to &.
There is no setting that can do this in Joomla 2.5 (as far as I know).
The only think capable of doing such a thing would have to be a system plugin that will re-encode the URLs.
So my first idea would be to check all the System plugins that may be URL related (like SEF things, or redirect plugins or some routing plug in and so on).
If that fails try to disable all System plugins and see if that fixes the issue.
Another way to test is to get a new fresh Joomla install and add one by one the components that you have on the broken install.
PS: Turns out it was a custom system plugin. (see comments)

Codeigniter error 500 when attempting to load lang file

I've installed Lubuntu 11.10 x86 on my home server. I previously had Win XP. The server runs well. Apache, PHP and MySQL work great except when it comes to CodeIgniter and language files. First of all php works, I've tested with non CI projects and it's fine. I've also tested a brand new CI project and I get the welcome page. I have a couple projects in CI that have 2 languages and those don't work. To isolate the problem I've copied over the home controller, view and language file. Error 500 when viewing it. If I comment out $this->lang->load('home'); it works fine. If I comment out the content of home_lang.php it works.
I've narrowed it down to the anchor helper in the language file: $lang['home.project1.image'] = anchor('portfolio', 'test'); The url helper is loaded. This worked before. Can I have anchors in the language file? How come this is causing a problem?
If you look at CodeIgniter's documentation for their Language class, they provide an overview:
The Language Class provides functions to retrieve language files and
lines of text for purposes of internationalization.
I'm not sure what's causing your server to flip out, but I'd use the language class to load text strings and wrap any links around them in your view rather than in the _lang file.

Categories